Package com.vmware.vm

Class VMReconfig


  • @Sample(name="vm-reconfig",
            description="Reconfigures a virtual machine, which include reconfiguring the disk size, disk mode, etc.")
    public class VMReconfig
    extends ConnectedVimServiceBase
     VMReconfig
    
     Reconfigures a virtual machine, which include reconfiguring the disk size, disk mode, etc.
    
     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
     device         [required] : cpu|memory|disk|cd|nic
     operation      [required] : add|remove|update
     update operation is only possible for cpu and memory, add|remove are not allowed for cpu and memory
     value          [required] : high|low|normal|numeric value, label of device when removing
     disksize       [optional] : Size of virtual disk
     diskmode       [optional] : persistent|independent_persistent,independent_nonpersistent
     
     Command Line:
     run.bat com.vmware.vm.VMReconfig --url [URLString] --username [User] --password [Password]
     --vmname [VMName] --operation [Operation] --device [Devicetype] --value [Value]
     --disksize [Virtualdisksize] --diskmode [VDiskmode]
     
    • Constructor Detail

      • VMReconfig

        public VMReconfig()
    • Method Detail

      • setVmName

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

        @Option(name="device",
                description="[cpu|memory|disk|cd|nic]")
        public void setDevice​(java.lang.String device)
      • setOperation

        @Option(name="operation",
                required=true,
                description="[add|remove|update]update operation is only possible for cpu and memory, add|remove are not allowed for cpu and memory")
        public void setOperation​(java.lang.String operation)
      • setValue

        @Option(name="value",
                description="high|low|normal|numeric value, label of device when removing")
        public void setValue​(java.lang.String value)
      • setDisksize

        @Option(name="disksize",
                required=false,
                description="Size of virtual disk")
        public void setDisksize​(java.lang.String disksize)
      • setDiskmode

        @Option(name="diskmode",
                required=false,
                description="persistent|independent_persistent,independent_nonpersistent")
        public void setDiskmode​(java.lang.String diskmode)
      • run

        @Action
        public void run()
                 throws com.vmware.vim25.InvalidPropertyFaultMsg,
                        com.vmware.vim25.DuplicateNameFaultMsg,
                        com.vmware.vim25.TaskInProgressFaultMsg,
                        com.vmware.vim25.InsufficientResourcesFaultFaultMsg,
                        com.vmware.vim25.VmConfigFaultFaultMsg,
                        com.vmware.vim25.InvalidDatastoreFaultMsg,
                        com.vmware.vim25.FileFaultFaultMsg,
                        com.vmware.vim25.ConcurrentAccessFaultMsg,
                        com.vmware.vim25.InvalidStateFaultMsg,
                        com.vmware.vim25.InvalidCollectorVersionFaultMsg,
                        com.vmware.vim25.InvalidNameFaultMsg,
                        com.vmware.vim25.RuntimeFaultFaultMsg
        Throws:
        com.vmware.vim25.InvalidPropertyFaultMsg
        com.vmware.vim25.DuplicateNameFaultMsg
        com.vmware.vim25.TaskInProgressFaultMsg
        com.vmware.vim25.InsufficientResourcesFaultFaultMsg
        com.vmware.vim25.VmConfigFaultFaultMsg
        com.vmware.vim25.InvalidDatastoreFaultMsg
        com.vmware.vim25.FileFaultFaultMsg
        com.vmware.vim25.ConcurrentAccessFaultMsg
        com.vmware.vim25.InvalidStateFaultMsg
        com.vmware.vim25.InvalidCollectorVersionFaultMsg
        com.vmware.vim25.InvalidNameFaultMsg
        com.vmware.vim25.RuntimeFaultFaultMsg