Package com.vmware.spbm.samples
Class VMRelocate
- java.lang.Object
-
- com.vmware.spbm.connection.ConnectedServiceBase
-
- com.vmware.spbm.samples.VMRelocate
-
@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 ConnectedServiceBaseVMRelocate 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 Summary
Constructors Constructor Description VMRelocate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsetProfileName(java.lang.String profileName)voidsetVmPathName(java.lang.String vmPathName)-
Methods inherited from class com.vmware.spbm.connection.ConnectedServiceBase
setConnection, start, stop
-
-
-
-
Method Detail
-
run
@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- Throws:
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
-
setProfileName
@Option(name="profilename", description="Name of the storage profile", required=true) public void setProfileName(java.lang.String profileName)
-
setVmPathName
@Option(name="vmpath", description="inventory path of the VM", required=true) public void setVmPathName(java.lang.String vmPathName)
-
-