List all the VMs running on the host:
~ # vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
612 vm_name1 [datastore] vm_name1/vm_name1.vmx rhel6_64Guest vmx-10
633 vm_name2 [datastore] vm_name2/vm_name2.vmx rhel6_64Guest vmx-10
646 vm_name3 [datastore] vm_name3/vm_name3.vmx rhel6_64Guest vmx-10
647 vm_name4 [datastore] vm_name4/vm_name4.vmx rhel6_64Guest vmx-10
664 vm_name5 [datastore] vm_name5/vm_name5.vmx rhel6_64Guest vmx-10
To poweroff a VM
vim-cmd vmsvc/power.off 612 #here 612 is a vim id
To poweron a VM
vim-cmd vmsvc/power.on 612 #here 612 is a vim id
There are somany commands you can use are as below:
Commands available under vmsvc/:
acquiremksticket get.snapshotinfo
acquireticket get.spaceNeededForConsolidation
connect get.summary
convert.toTemplate get.tasklist
convert.toVm getallvms
createdummyvm gethostconstraints
destroy login
device.connection logout
device.connusbdev message
device.disconnusbdev power.getstate
device.diskadd power.hibernate
device.diskaddexisting power.off
device.diskremove power.on
device.getdevices power.reboot
device.toolsSyncSet power.reset
device.vmiadd power.shutdown
device.vmiremove power.suspend
devices.createnic power.suspendResume
disconnect queryftcompat
get.capability reload
get.config setscreenres
get.config.cpuidmask snapshot.create
get.configoption snapshot.dumpoption
get.datastores snapshot.get
get.disabledmethods snapshot.remove
get.environment snapshot.removeall
get.filelayout snapshot.revert
get.filelayoutex snapshot.setoption
get.guest tools.cancelinstall
get.guestheartbeatStatus tools.install
get.managedentitystatus tools.upgrade
get.networks unregister
get.runtime upgrade
With VMotion, VM guests are able to move from one ESX Server to another with no downtime for the users. What is required is a shared SAN storage system between the ESX Servers and a VMotion license.
Storage VMotion (or SVMotion) is similar to VMotion in the sense that it moves VM guests without any downtime. However, what SVMotion also offers is the capability to move the storage for that guest at the same time that it moves the guest. Thus, you could move a VM guest from one ESX server’s local storage to another ESX server’s local storage with no downtime for the end users of that VM guest.
Recent Comments