Currently Im using vim-cmd
to perform multiple operations in my VMware center.
I'm using SSH paramiko module to connect and retrieve vim-cmd
command status:
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.getstate 13
vim-cmd vmsvc/power.on 13
vim-cmd vmsvc/power.off 13
vim-cmd vmsvc/destroy 13
I want to use pyVmomi
library to run some commands and for this it is required to provide the vmId
identifier:
from pyvim import connect
from pyVmomi import vim
from pyVmomi import vmodl
vim-cmd vmsvc/get.summary 13
Listsummary:
(vim.vm.Summary) {
dynamicType = <unset>,
vm = 'vim.VirtualMachine:13',
What command can I use to get the vmId
?