Package com.vmware.vm

Class VMManageFloppy


  • @Sample(name="vm-manage-floppy",
            description="This sample adds / removes floppy to / from an existing VM\nThis sample lists information about a VMs Floppies\nThis sample updates an existing floppy drive on a VM\n")
    public class VMManageFloppy
    extends ConnectedVimServiceBase
     VMManageFloppy
    
     This sample adds / removes floppy to / from an existing VM
     This sample lists information about a VMs Floppies
     This sample updates an existing floppy drive on a VM
    
     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
     operation         [required] : operation type - [get|add|remove|set]
     imgpath           [optional] : path of image file
     remote            [optional] : device is a remote or client device or iso
     startconnected    [optional] : virtual floppy starts connected on VM poweron
     connect           [optional] : virtual floppy is connected
                                    Set only if the VM is powered on
     label             [optional] : used to find the device.key value
     device            [optional] : path to the floppy on the VM's host
    
     Command Line:
     Get Floppy Info");
     run.bat com.vmware.vm.VMManageFloppy
     --url [webserviceurl] --username [username] --password  [password]
     --operation get --vmname [Virtual Machine Name]
    
     Add Floppy
     run.bat com.vmware.vm.VMManageFloppy
     --url [webserviceurl] --username [username] --password [password]
     --operation add --vmname [Virtual Machine Name]
     --imgpath test.flp --remote false --connect true
    
     Remove Floppy
     run.bat com.vmware.vm.VMManageFloppy
     --url [webserviceurl] --username [username] --password  [password]
     --operation remove --vmname [Virtual Machine Name]
     --label Floppy Drive 1
    
     Reconfigure Floppy
     run.bat com.vmware.vm.VMManageFloppy
     --url [webserviceurl] --username [username] --password  [password]
     --operation set --vmname [Virtual Machine Name]
     --label Floppy Drive 1 --connect false
     
    • Constructor Detail

      • VMManageFloppy

        public VMManageFloppy()
    • Method Detail

      • setVirtualmachinename

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

        @Option(name="operation",
                description="operation type - [get|add|remove|set]")
        public void setOperation​(java.lang.String operation)
      • setImagePath

        @Option(name="imgpath",
                required=false,
                description="path of image file")
        public void setImagePath​(java.lang.String imagePath)
      • setRemote

        @Option(name="remote",
                required=false,
                description="device is a remote or client device or iso")
        public void setRemote​(java.lang.String remote)
      • setStartConnected

        @Option(name="startconnected",
                required=false,
                description="virtual floppy starts connected on VM poweron")
        public void setStartConnected​(java.lang.String startConnected)
      • setSetConnect

        @Option(name="connect",
                required=false,
                description="virtual floppy is connected. Set only if the VM is powered on")
        public void setSetConnect​(java.lang.String setConnect)
      • setLabel

        @Option(name="lable",
                required=false,
                description="used to find the device.key value")
        public void setLabel​(java.lang.String label)
      • setDevice

        @Option(name="device",
                required=false,
                description="path to the floppy on the VM\'s host")
        public void setDevice​(java.lang.String device)
      • run

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