Hello everyone,
I'm currently working for a client that wants to be able to initiate VMotion (not Storage VMotion) from a command line. Does anyone know how to do this?
Thanks in advance,
Remko
have a look at this it appears to give a proceedure for a CLI based VMotion like process, there is no VMware equivilent
Tom Howarth
VMware Communities User Moderator
Thanks for your answer,
I think it must be possible usinge the SDK, see
Migrates a virtual machine's execution to a specific resource pool or host.
Requires Resource.HotMigrate privilege if the virtual machine is powered on or Resource.ColdMigrate privilege if the virtual machine is powered off or suspended.
Required Privileges
Dynamic - See discussion above
Parameters
Name | Type | Description |
---|---|---|
_this | A reference to the VirtualMachine used to make the method call. | |
pool* P | to a ResourcePool | The target resource pool for the virtual machine. If the pool parameter is left unset, the virtual machine's current pool is used as the target pool. |
host* | to a HostSystem | The target host to which the virtual machine is intended to migrate. The host parameter may be left unset if the compute resource associated with the target pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used as the target host. In the latter case, the DRS system selects an appropriate target host from the cluster. |
priority | The priority of the migration task. | |
state* | If specified, the virtual machine migrates only if its state matches the specified state. |
*Need not be set P Required privilege: Resource.AssignVMToPool
I found a script that was written for a performance test Dell was doing on th 1955 blade Server. The script is at the end of this PDF - http://www.dell.com/downloads/global/solutions/vmware_1955.pdf
It's not exactly what you are looking for but I hope it will help.
-rick
you can use VIMSH but it is a steep learning curve
Tom Howarth
VMware Communities User Moderator
Here is some sample code: http://communities.vmware.com/thread/92766
Have you tried the new VI toolkit? See this referenece:
http://www.vmware.com/beta/vitk_win/
Note this is still a Beta release of the toolkit, but it looks like it might solve the customer's issue. The Cmdlets reference manual shows the command would be Move-VM.
Thanks everyone!
I'm going to try the vi perl toolkit this afternoon. Seems like this is what is going to work! I'll let you know what the results are....
Remko