Package com.vmware.vm

Class VMotion


  • @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
     
    • Constructor Detail

      • VMotion

        public VMotion()
    • Method Detail

      • setVmName

        @Option(name="vmname",
                description="name of the virtual machine")
        public void setVmName​(java.lang.String name)
      • setTargetHost

        @Option(name="targethost",
                description="Name of the target host")
        public void setTargetHost​(java.lang.String host)
      • setSourceHost

        @Option(name="sourcehost",
                description="Name of the host containing the virtual machine")
        public void setSourceHost​(java.lang.String sourceHost)
      • setTargetPool

        @Option(name="targetpool",
                description="Name of the target resource pool")
        public void setTargetPool​(java.lang.String targetPool)
      • setTargetDS

        @Option(name="targetdatastore",
                description="Name of the target datastore")
        public void setTargetDS​(java.lang.String targetDS)
      • setPriority

        @Option(name="priority",
                description="The priority of the migration task: default_Priority, high_Priority,low_Priority")
        public void setPriority​(java.lang.String priority)
      • setState

        @Option(name="state",
                required=false)
        public void setState​(java.lang.String state)
      • run

        @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
        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