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
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::VM Class Reference
Inheritance diagram for Com::Vmware::Vcenter::VM:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  CreateSpec
 
class  FilterSpec
 
class  Info
 
class  PlacementSpec
 
class  Summary
 

Avaliable Methods

public method create ()
 
public method delete ()
 
public method get ()
 
public method new ()
 
public method list ()
 

Detailed Description

The Com::Vmware::Vcenter::VM interface provides methods for managing the lifecycle of a virtual machine.

Member Function Documentation

public method Com::Vmware::Vcenter::VM::create ( )

Creates a virtual machine.

Parameters
spec[REQUIRED] Virtual machine specification. . The value must be Com::Vmware::Vcenter::VM::CreateSpec.
Return values
IDof newly-created virtual machine. The value will be an identifier for the resource type getQualifiedName(VirtualMachine). The return type will be str
Exceptions
Com::Vmware::Vapi::Std::Errors::AlreadyExistsif a virtual machine with the specified name already exists.
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif any of the specified parameters are invalid.
Com::Vmware::Vapi::Std::Errors::NotFoundif any of the resources specified in spec could not be found
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif a specified resource (eg. host) is not accessible.
Com::Vmware::Vapi::Std::Errors::ResourceInUseif any of the specified storage addresses (eg. IDE, SATA, SCSI) result in a storage address conflict.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::UnableToAllocateResourceif any of the resources needed to create the virtual machine could not be allocated.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Com::Vmware::Vapi::Std::Errors::Unsupportedif guestOS is not supported for the requested virtual hardware version and spec* includes null fields that default to guest-specific values.
Code:
click to view
public method Com::Vmware::Vcenter::VM::delete ( )

Deletes a virtual machine.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine is not found.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::VM::get ( )

Returns information about a virtual machine.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
Return values
Informationabout the specified virtual machine. The return type will be Com::Vmware::Vcenter::VM::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine is not found.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::VM::list ( )

Returns information about at most 1000 visible (subject to permission checks) virtual machines in vCenter matching the class Com::Vmware::Vcenter::VM::FilterSpec .

Parameters
filter[OPTIONAL] Specification of matching virtual machines for which information should be returned. If null , the behavior is equivalent to a class Com::Vmware::Vcenter::VM::FilterSpec with all fields null which means all virtual machines match the filter. . The value must be Com::Vmware::Vcenter::VM::FilterSpec or None.
Return values
Commonlyused information about the virtual machines matching the class Com::Vmware::Vcenter::VM::FilterSpec . The return type will be Array of Com::Vmware::Vcenter::VM::Summary
Exceptions
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif the :attr:Com::Vmware::Vcenter::VM::FilterSpec.power_states field contains a value that is not supported by the server.
Com::Vmware::Vapi::Std::Errors::UnableToAllocateResourceif more than 1000 virtual machines match the class Com::Vmware::Vcenter::VM::FilterSpec .
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::VM::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view

The documentation for this class was generated from the following file: