|
VMware vSphere Automation SDK Perl
The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities
|
Classes | |
| class | BackingInfo |
| class | BackingSpec |
| class | BackingType |
| class | CreateSpec |
| class | HostBusAdapterType |
| class | Info |
| class | Summary |
| class | UpdateSpec |
| class | VmdkCreateSpec |
Avaliable Methods | |
| public method | create () |
| public method | delete () |
| public method | get () |
| public method | new () |
| public method | update () |
| public method | list () |
The Com::Vmware::Vcenter::Vm::Hardware::Disk interface provides methods for configuring the virtual disks of a virtual machine. A virtual disk has a backing such as a VMDK file. The backing has an independent lifecycle from the virtual machine when it is detached from the virtual machine. The :func:Com::Vmware::Vcenter::Vm::Hardware::Disk.create method provides the ability to create a new virtual disk. When creating a virtual disk, a new VMDK file may be created or an existing VMDK file may used as a backing. Once a VMDK file is associated with a virtual machine, its lifecycle will be bound to the virtual machine. In other words, it will be deleted when the virtual machine is deleted. The :func:Com::Vmware::Vcenter::Vm::Hardware::Disk.delete method provides the ability to detach a VMDK file from the virtual machine. The :func:Com::Vmware::Vcenter::Vm::Hardware::Disk.delete method does not delete the VMDK file that backs the virtual disk. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted. Constant String::RESOURCE_TYPE # Resource type for the virtual disk.
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::create | ( | ) |
Adds a virtual disk to the virtual machine. While adding the virtual disk, a new VMDK file may be created or an existing VMDK file may be used to back the virtual disk.
| vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str. |
| spec | [REQUIRED] Specification for the new virtual disk. . The value must be Com::Vmware::Vcenter::Vm::Hardware::Disk::CreateSpec. |
| Virtual | disk identifier. The value will be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Disk). The return type will be str |
| Com::Vmware::Vapi::Std::Errors::Error | if system reported that the disk device was created but was unable to confirm the creation because the identifier of the new device could not be determined. |
| Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine is not found. |
| Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if the virtual machine is suspended or if the virtual machine is powered on and virtual disk type is IDE. |
| Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource | if the specified storage address is unavailable; for example, if the SCSI adapter requested does not exist. |
| Com::Vmware::Vapi::Std::Errors::ResourceInUse | if the specified storage address is in use. |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the specified storage address is out of bounds. |
| Com::Vmware::Vapi::Std::Errors::ResourceBusy | if the virtual machine is busy performing another operation. |
| Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed. |
| Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request. |
| Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges. |
| Com::Vmware::Vapi::Std::Errors::Unsupported | if the guest operating system of the virtual machine is not supported and spec includes null fields that default to guest-specific values. |
Code:
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::delete | ( | ) |
Removes a virtual disk from the virtual machine. This method does not destroy the VMDK file that backs the virtual disk. It only detaches the VMDK file from the virtual machine. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted.
| vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str. |
| disk | [REQUIRED] Virtual disk identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Disk). . The value must be str. |
| Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine or virtual disk is not found. |
| Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if the virtual machine is suspended or if the virtual machine is powered on and virtual disk type is IDE. |
| Com::Vmware::Vapi::Std::Errors::ResourceBusy | if the virtual machine is busy performing another operation. |
| Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed. |
| Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request. |
| Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges. |
Code:
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::get | ( | ) |
Returns information about a virtual disk.
| vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str. |
| disk | [REQUIRED] Virtual disk identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Disk). . The value must be str. |
| Information | about the specified virtual disk. The return type will be Com::Vmware::Vcenter::Vm::Hardware::Disk::Info |
| Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine or virtual disk is not found. |
| Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed. |
| Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request. |
| Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges. |
Code:
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::list | ( | ) |
Returns commonly used information about the virtual disks belonging to the virtual machine.
| vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str. |
| List | of commonly used information about the virtual disks. The return type will be Array of Com::Vmware::Vcenter::Vm::Hardware::Disk::Summary |
| Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine is not found. |
| Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed. |
| Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request. |
| Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges. |
Code:
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::new | ( | ) |
Constructor to initialize the object
| api_provider | - protocol connection to use with stubs created by this factory |
| StubConfig | - Stub's additional configuration |
| Blessed | object |
Code:
| public method Com::Vmware::Vcenter::Vm::Hardware::Disk::update | ( | ) |
Updates the configuration of a virtual disk. An update method can be used to detach the existing VMDK file and attach another VMDK file to the virtual machine.
| vm | [REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str. |
| disk | [REQUIRED] Virtual disk identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Disk). . The value must be str. |
| spec | [REQUIRED] Specification for updating the virtual disk. . The value must be Com::Vmware::Vcenter::Vm::Hardware::Disk::UpdateSpec. |
| Com::Vmware::Vapi::Std::Errors::Error | if the system reports an error while responding to the request. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the virtual machine or virtual disk is not found. |
| Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if one or more of the fields specified in the spec parameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual disk. |
| Com::Vmware::Vapi::Std::Errors::ResourceBusy | if the virtual machine is busy performing another operation. |
| Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the virtual machine's configuration state cannot be accessed. |
| Com::Vmware::Vapi::Std::Errors::ServiceUnavailable | if the system is unable to communicate with a service to complete the request. |
| Com::Vmware::Vapi::Std::Errors::Unauthenticated | if the user can not be authenticated. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if the user doesn't have the required privileges. |
Code: