@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
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
VMManageFloppy() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setDevice(java.lang.String device) |
void |
setImagePath(java.lang.String imagePath) |
void |
setLabel(java.lang.String label) |
void |
setOperation(java.lang.String operation) |
void |
setRemote(java.lang.String remote) |
void |
setSetConnect(java.lang.String setConnect) |
void |
setStartConnected(java.lang.String startConnected) |
void |
setVirtualmachinename(java.lang.String virtualmachinename) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="vmname",
description="name of the virtual machine")
public void setVirtualmachinename(java.lang.String virtualmachinename)
@Option(name="operation",
description="operation type - [get|add|remove|set]")
public void setOperation(java.lang.String operation)
@Option(name="imgpath",
required=false,
description="path of image file")
public void setImagePath(java.lang.String imagePath)
@Option(name="remote",
required=false,
description="device is a remote or client device or iso")
public void setRemote(java.lang.String remote)
@Option(name="startconnected",
required=false,
description="virtual floppy starts connected on VM poweron")
public void setStartConnected(java.lang.String startConnected)
@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)
@Option(name="lable",
required=false,
description="used to find the device.key value")
public void setLabel(java.lang.String label)
@Option(name="device",
required=false,
description="path to the floppy on the VM\'s host")
public void setDevice(java.lang.String device)
@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
com.vmware.vim25.DuplicateNameFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.TaskInProgressFaultMsgcom.vmware.vim25.InsufficientResourcesFaultFaultMsgcom.vmware.vim25.VmConfigFaultFaultMsgcom.vmware.vim25.InvalidDatastoreFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.FileFaultFaultMsgcom.vmware.vim25.ConcurrentAccessFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.vim25.InvalidNameFaultMsg