Class 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 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 Detail

      • VMRelocate

        public VMRelocate()
    • 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.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.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)