@Sample(name="vmotion",
description="Used to validate if VMotion is feasible between two hosts or not,\nIt is also used to perform migrate/relocate task depending on the data given")
public class VMotion
extends ConnectedVimServiceBase
VMotion
Used to validate if VMotion is feasible between two hosts or not,
It is also used to perform migrate/relocate task depending on the data given
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
vmname [required] : name of the virtual machine
targethost [required] : Name of the target host
sourcehost [required] : Name of the host containing the virtual machine
targetpool [required] : Name of the target resource pool
targetdatastore [required] : Name of the target datastore
priority [required] : The priority of the migration task:-
default_Priority, high_Priority,low_Priority
state [optional]
Command Line:
run.bat com.vmware.vm.VMotion --url [URLString] --username [User] --password [Password]
--vmname [VMName] --targethost [Target host] --sourcehost [Source host] --targetpool [Target resource pool]
--targetdatastore [Target datastore] --priority [Migration task priority] --state
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
VMotion() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setPriority(java.lang.String priority) |
void |
setSourceHost(java.lang.String sourceHost) |
void |
setState(java.lang.String state) |
void |
setTargetDS(java.lang.String targetDS) |
void |
setTargetHost(java.lang.String host) |
void |
setTargetPool(java.lang.String targetPool) |
void |
setVmName(java.lang.String name) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="vmname",
description="name of the virtual machine")
public void setVmName(java.lang.String name)
@Option(name="targethost",
description="Name of the target host")
public void setTargetHost(java.lang.String host)
@Option(name="sourcehost",
description="Name of the host containing the virtual machine")
public void setSourceHost(java.lang.String sourceHost)
@Option(name="targetpool",
description="Name of the target resource pool")
public void setTargetPool(java.lang.String targetPool)
@Option(name="targetdatastore",
description="Name of the target datastore")
public void setTargetDS(java.lang.String targetDS)
@Option(name="priority",
description="The priority of the migration task: default_Priority, high_Priority,low_Priority")
public void setPriority(java.lang.String priority)
@Option(name="state",
required=false)
public void setState(java.lang.String state)
@Action
public void run()
throws com.vmware.vim25.RuntimeFaultFaultMsg,
com.vmware.vim25.VmConfigFaultFaultMsg,
com.vmware.vim25.InsufficientResourcesFaultFaultMsg,
com.vmware.vim25.InvalidDatastoreFaultMsg,
com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.FileFaultFaultMsg,
com.vmware.vim25.MigrationFaultFaultMsg,
com.vmware.vim25.InvalidStateFaultMsg,
com.vmware.vim25.InvalidCollectorVersionFaultMsg,
com.vmware.vim25.TimedoutFaultMsg
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.VmConfigFaultFaultMsgcom.vmware.vim25.InsufficientResourcesFaultFaultMsgcom.vmware.vim25.InvalidDatastoreFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.FileFaultFaultMsgcom.vmware.vim25.MigrationFaultFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.vim25.TimedoutFaultMsg