@Sample(name="vm-relocate",
description="Used to relocate a virtual machine\'s virtual disks to a datastore compliant with the given storage profile. If multiple datastores are compliant, this sample picks one of them.")
public class VMRelocate
extends ConnectedServiceBase
VMRelocate Used to relocate a virtual machine's virtual disks to a datastore compliant with the given storage policy based management profile. If multiple datastores are compliant, this sample picks one of them. Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vmpath [required] : inventory path of the VM profilename [required] : Name of the storage profile Command Line: run.bat com.vmware.vm.VMRelocate --url [URLString] --username [User] --password [Password] --vmpath [vmPath] --profilename [profilename]
| Constructor and Description |
|---|
VMRelocate() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setProfileName(java.lang.String profileName) |
void |
setVmPathName(java.lang.String vmPathName) |
setConnection, start, stop@Action
public void run()
throws com.vmware.vim25.RuntimeFaultFaultMsg,
com.vmware.vim25.InsufficientResourcesFaultFaultMsg,
com.vmware.vim25.VmConfigFaultFaultMsg,
com.vmware.vim25.InvalidDatastoreFaultMsg,
com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.FileFaultFaultMsg,
com.vmware.vim25.InvalidStateFaultMsg,
com.vmware.vim25.MigrationFaultFaultMsg,
com.vmware.vim25.InvalidCollectorVersionFaultMsg,
com.vmware.vim25.TimedoutFaultMsg,
com.vmware.pbm.InvalidArgumentFaultMsg,
com.vmware.pbm.RuntimeFaultFaultMsg,
com.vmware.pbm.PbmFaultFaultMsg
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InsufficientResourcesFaultFaultMsgcom.vmware.vim25.VmConfigFaultFaultMsgcom.vmware.vim25.InvalidDatastoreFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.FileFaultFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.MigrationFaultFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.vim25.TimedoutFaultMsgcom.vmware.pbm.InvalidArgumentFaultMsgcom.vmware.pbm.PbmFaultFaultMsg@Option(name="profilename",
description="Name of the storage profile",
required=true)
public void setProfileName(java.lang.String profileName)
@Option(name="vmpath",
description="inventory path of the VM",
required=true)
public void setVmPathName(java.lang.String vmPathName)