Package com.vmware.fcd
Class FcdLegacyDiskAndAssociationOperations
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.fcd.FcdLegacyDiskAndAssociationOperations
-
@Sample(name="legacy-disk-and-association", description="This sample registers a given legacy disk as FCD, attach FCD to VM and retrieve FCD associations.") public class FcdLegacyDiskAndAssociationOperations extends com.vmware.connection.ConnectedVimServiceBaseLegacyDiskAndAssociationOperations This sample executes below operations on a given VStorageObject from vslm: 1. Register a given legacy disk as FCD. 2. Attach a given virtual storage object to the given virtual machine. 3. Retrieve vm associations for each virtual storage object in the query. Pre-requisite : 1. Existing VStorageObject ID 2. Existing vm name Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vstorageobjectid [required] : Uuid of the disk legacydiskfilename [required] : File name of the legacy disk datacentername [required] : Name of the datacenter vmname [required] : Name of the virtual machine. A minimum virtual machine version of 'vmx-13' is required for the attach operation to succeed. vm can be present in any folder, host or datastore. fcdname [optional] : Name of the newly created first class disk object. controllerkey [optional] : Device Key of the controller the disk will connect to. It can be unset if there is only one controller (SCSI or SATA) with the available slot in the virtual machine. If there are multiple SCSI or SATA controllers available, user must specify the controller unitnumber [optional] : Unit number of the virtual machine Command Line: Register a given legacy disk as First class disk. run.bat com.vmware.fcd.FcdLegacyDiskAndAssociationOperations --url [webserviceurl] --username [username] --password [password] --vstorageobjectid [vstorageobjectid] --legacydiskfilename [legacydiskfilename] --vmname [vmname] Ex: --legacydiskfilename "[sharedVmfs-0] VM_NAME/VM_NAME.vmdk"
-
-
Constructor Summary
Constructors Constructor Description FcdLegacyDiskAndAssociationOperations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsetControllerKey(java.lang.String controllerKey)voidsetDataCenterName(java.lang.String dataCenterName)voidsetFcdName(java.lang.String fcdName)voidsetLegacyDiskFileName(java.lang.String legacyDiskFileName)voidsetUnitNumber(java.lang.String unitNumber)voidsetVmName(java.lang.String vmName)voidsetVStorageObjectId(java.lang.String vStorageObjectId)
-
-
-
Method Detail
-
setVStorageObjectId
@Option(name="vstorageobjectid", required=true, description="Uuid of the vstorageobject to be attached to vm.") public void setVStorageObjectId(java.lang.String vStorageObjectId)- Parameters:
vStorageObjectId- the vStorageObjectId to set
-
setLegacyDiskFileName
@Option(name="legacydiskfilename", required=true, description="File name of the legacy disk.") public void setLegacyDiskFileName(java.lang.String legacyDiskFileName)- Parameters:
legacyDiskFileName- the legacyDiskFileName to set
-
setDataCenterName
@Option(name="datacentername", required=true, description="Name of the datacenter") public void setDataCenterName(java.lang.String dataCenterName)- Parameters:
dataCenterName- the dataCenterName to set
-
setFcdName
@Option(name="fcdname", required=false, description="File name of the legacy disk.") public void setFcdName(java.lang.String fcdName)- Parameters:
fcdName- the fcdName to set
-
setVmName
@Option(name="vmname", required=true, description="Name of virtual machine.") public void setVmName(java.lang.String vmName)- Parameters:
vmName- the vmName to set
-
setControllerKey
@Option(name="controllerkey", required=false, description="Device Key of the controller.") public void setControllerKey(java.lang.String controllerKey)- Parameters:
controllerKey- the controllerKey to set
-
setUnitNumber
@Option(name="unitnumber", required=false, description="Unit number of the virtual machine.") public void setUnitNumber(java.lang.String unitNumber)- Parameters:
unitNumber- the unitNumber to set
-
run
@Action public void run() throws java.lang.Exception- Throws:
java.lang.Exception
-
-