com.vmware.vcenter.vm package
Subpackages
Submodules
com.vmware.vcenter.vm.compute_client module
The com.vmware.vcenter.vm.compute_client module provides classes for
quering the status of compute policies on virtual machines.
- class com.vmware.vcenter.vm.compute_client.Policies(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Policiesclass provides methods to query the status of policies on virtual machines.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(status=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Policies.Infoclass contains information about the compliance of a virtual machine with a compute policy.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- status ( - com.vmware.vcenter.compute.policies_client.ObjectCompliance) – The compliance status of the policy on a specified object.
 
 - get(vm, policy)
- Returns information about the compliance of a virtual machine with a compute policy. - Parameters
- vm ( - str) – Identifier of the virtual machine to query the status for. The parameter must be an identifier for the resource type:- VirtualMachine.
- policy ( - str) – Identifier of the policy to query the status for. The parameter must be an identifier for the resource type:- com.vmware.vcenter.compute.Resources.COMPUTE_POLICY.
 
- Return type
- Returns
- Information about the compliance of the specified virtual machine with the specified compute policy. 
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif a virtual machine with the given identifier does not exist, or if a policy with the given identifier does not exist.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.compute_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.vm.console_client module
The com.vmware.vcenter.vm.console_client module provides classes for
managing Virtual Machine Consoles.
- class com.vmware.vcenter.vm.console_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
- class com.vmware.vcenter.vm.console_client.Tickets(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Ticketsclass provides methods for managing the virtual machine console tickets. This class was added in vSphere API 7.0.0.2.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class CreateSpec(type=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Tickets.CreateSpecclass defines the information used to create the virtual machine console ticket. This class was added in vSphere API 7.0.0.2.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Tickets.Type) – The type of virtual machine console ticket. This attribute was added in vSphere API 7.0.0.2.
 
 - class Summary(ticket=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Tickets.Summaryclass contains commonly used information about the virtual machine console ticket. This class was added in vSphere API 7.0.0.2.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- ticket ( - str) – Console ticket URI. This attribute was added in vSphere API 7.0.0.2.
 
 - class Type(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Tickets.Typeclass defines the types of console tickets. This enumeration was added in vSphere API 7.0.0.2.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- Typeinstance.
 - VMRC = Type(string='VMRC')
- Virtual machine remote console ticket. This class attribute was added in vSphere API 7.0.0.2. 
 - WEBMKS = Type(string='WEBMKS')
- Web socket console ticket. This class attribute was added in vSphere API 7.0.0.2. 
 
 - create(vm, spec)
- Creates a virtual machine console ticket of a given ticket type. The created ticket is a one time use URI. The validity of the ticket is 30 minutes, if not used with in the time frame the ticket expires. - The - Tickets.Type.VMRCticket contains the IP address or the DNS resolvable name of the vCenter server. This ticket requires installation of VMware Workstation, VMware Fusion or VMRC to be installed on the machine where the ticket has to be opened. This ticket can be acquired even when the VM is turned off.- The - Tickets.Type.WEBMKSticket contains the IP address of the DNS resolvable name of the ESX server. This ticket requires user to embed this ticket in a HTML page using VMware HTML Console SDK - https://www.vmware.com/support/developer/html-console This ticket can be acquired only when the VM is turned on.. This method was added in vSphere API 7.0.0.2.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Tickets.CreateSpec) – Specification for the console ticket to be created.
 
- Return type
- Returns
- Commonly used information about the virtual machine console ticket. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the {\@link CreateSpec#type) attribute contains a value that is not supported by the server.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is powered off and requested ticket type is- Tickets.Type.WEBMKS
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration or execution state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
com.vmware.vcenter.vm.data_sets_client module
The com.vmware.vcenter.vm.data_sets_client module provides classes for
manipulating entries in data sets.
- class com.vmware.vcenter.vm.data_sets_client.Entries(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Entriesclass provides methods for manipulating individual entries in a data set. This class was added in vSphere API 8.0.0.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - delete(vm, data_set, key)
- Deletes an entry in a data set. This method was added in vSphere API 8.0.0.0. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- data_set ( - str) – Identifier of the data set. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.DataSet.
- key ( - str) – The key of the entry to delete. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.data_sets.Entry.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is in a state that doesn’t allow modifications, for example suspended.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the data set is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif there is no entry associated with- keyin the- data_set.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the data set access mode prevents the operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual hardware version of the virtual machine does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the ESXi host version does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.DataSets.DataSetEntryDelete.
 
 
 - get(vm, data_set, key)
- Retrieves the value of an entry in a data set. This method was added in vSphere API 8.0.0.0. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- data_set ( - str) – Identifier of the data set. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.DataSet.
- key ( - str) – The key of the entry to retrieve. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.data_sets.Entry.
 
- Return type
- str
- Returns
- the value of the entry. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the data set is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif there is no entry associated with- keyin the- data_set.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the data set access mode prevents the operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual hardware version of the virtual machine does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the ESXi host version does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.DataSets.DataSetEntryGet.
 
 
 - list(vm, data_set)
- Lists all entry keys in a data set. This method was added in vSphere API 8.0.0.0. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- data_set ( - str) – Identifier of the data set. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.DataSet.
 
- Return type
- setof- str
- Returns
- The keys belonging to the data set. The return value will contain identifiers for the resource type: - com.vmware.vcenter.vm.data_sets.Entry.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the data set is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the data set access mode prevents the operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual hardware version of the virtual machine does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the ESXi host version does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.DataSets.DataSetEntryList.
 
 
 - set(vm, data_set, key, value)
- Creates or updates an entry in a data set. If an entry whose key matches - keyalready exists, it will replace the existing- value, otherwise it will create a new entry. This method was added in vSphere API 8.0.0.0.- Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- data_set ( - str) – Identifier of the data set. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.DataSet.
- key ( - str) – The key of the entry to set. A key can be at most 4096 bytes. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.data_sets.Entry.
- value ( - str) – The value of the entry to set. A value can be at most 1MB.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the key is too large.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the value is too large.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is in a state that doesn’t allow modifications, for example suspended.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the data set is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the new data set requires more resources than are available.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the data set access mode prevents the operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual hardware version of the virtual machine does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the ESXi host version does not support DataSets
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.DataSets.DataSetEntrySet.
 
 
 
- class com.vmware.vcenter.vm.data_sets_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.vm.guest_client module
The com.vmware.vcenter.vm.guest_client module provides classes for dealing
with the guest operating system. This includes information about the state of
local file systems and network interfaces and methods to manipulate the guest
file system and processes.
- class com.vmware.vcenter.vm.guest_client.Credentials(interactive_session=None, type=None, user_name=None, password=None, saml_token=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Credentialsclass defines the guest credentials used for guest operation authentication. This class was added in vSphere API 7.0.2.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- interactive_session ( - bool) – If- set, the method will interact with the logged-in desktop session in the guest. This requires that the logged-on user matches the user specified by the- Credentials. This is currently only supported for- Credentials.Type.USERNAME_PASSWORD. This attribute was added in vSphere API 7.0.2.0.
- type ( - Credentials.Type) – The guest credentials type. This attribute was added in vSphere API 7.0.2.0.
- user_name ( - stror- None) – For- Credentials.Type.SAML_BEARER_TOKEN, this is the guest user to be associated with the credentials. For- Credentials.Type.USERNAME_PASSWORDthis is the guest username. This attribute was added in vSphere API 7.0.2.0. If no user is specified for- Credentials.Type.SAML_BEARER_TOKEN, a guest dependent mapping will decide what guest user account is applied.
- password ( - str) – password. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value of- typeis- Credentials.Type.USERNAME_PASSWORD.
- saml_token ( - str) – SAML Bearer Token. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value of- typeis- Credentials.Type.SAML_BEARER_TOKEN.
 
 - class Type(string)
- Bases: - vmware.vapi.bindings.enum.Enum- Types of guest credentials. This enumeration was added in vSphere API 7.0.2.0. - Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- Typeinstance.
 - SAML_BEARER_TOKEN = Type(string='SAML_BEARER_TOKEN')
- SAML_BEARER_TOKEN contains the information necessary to authenticate within a guest using a SAML token. SAML Bearer token credentials relies on a guest alias that associates a guest account with the subject and certificate encoded in a SAML Bearer token obtained from the VMware SSO Server. This class attribute was added in vSphere API 7.0.2.0. 
 - USERNAME_PASSWORD = Type(string='USERNAME_PASSWORD')
- USERNAME_PASSWORD credentials contains the information necessary to authenticate within a guest using a username and password. This method of authentication is stateless. - To use USERNAME_PASSWORD, populate userName and password with the appropriate login information. - Once populated, you can use USERNAME_PASSWORD in any guest operations method.. This class attribute was added in vSphere API 7.0.2.0. 
 
 
- class com.vmware.vcenter.vm.guest_client.Customization(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Customizationclass provides methods to apply a customization specification to a virtual machine in powered-off status. This class was added in vSphere API 7.0.0.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(status=None, error=None, start_time=None, end_time=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Customization.Infoclass contains the status of a customization operation applied to a virtual machine. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- status ( - Customization.Info.Status) – The status of the customization operation. This attribute was added in vSphere API 7.0.0.0.
- error ( - stror- None) – Description of the error if the- Customization.Info.statusof customization operation is- Customization.Info.Status.FAILED. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if the status is not FAILED or there is no information available for the error.
- start_time ( - datetime.datetimeor- None) – Time when the customization process has started inside the guest operating system. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if the status is PENDING.
- end_time ( - datetime.datetimeor- None) – Time when the customization process has completed inside the guest operating system. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if the status is not SUCCEEDED or FAILED.
 
 - class Status(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Customization.Info.Statusclass defines the status values that can be reported for the customization operation. This enumeration was added in vSphere API 7.0.0.0.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- Statusinstance.
 - FAILED = Status(string='FAILED')
- The customizatio process has failed inside the guest operating system. This class attribute was added in vSphere API 7.0.0.0. 
 - IDLE = Status(string='IDLE')
- No customization spec is applied to the guest operating system. This class attribute was added in vSphere API 7.0.3.0. 
 - PENDING = Status(string='PENDING')
- The customization process has not yet started inside the guest operating system. This class attribute was added in vSphere API 7.0.0.0. 
 - RUNNING = Status(string='RUNNING')
- The customization process is currently running inside the guest operating system. This class attribute was added in vSphere API 7.0.0.0. 
 - SUCCEEDED = Status(string='SUCCEEDED')
- The customization process has completed successfully inside the guest operating system. This class attribute was added in vSphere API 7.0.0.0. 
 
 
 - class SetSpec(name=None, spec=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Customization.SetSpecclass contains specification information that has to be applied to a virtual machine. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- name ( - stror- None) – The name of the customization specification that has be retrieved from the virtual center inventory and applied for the virtual machine. Either one of- nameor- specor none of them should be specified. This attribute was added in vSphere API 7.0.0.0. If None and- specis also None when executing- Customization.set()method, then any pending customization for the virtual machine will be cleared.
- spec ( - com.vmware.vcenter.guest_client.CustomizationSpecor- None) – The customization specification that has to be applied for the virtual machine. Either one of- nameor- specor none of them should be specified. This attribute was added in vSphere API 7.0.0.0. If None and- nameis also None when executing- Customization.set()method, then any pending customization for the virtual machine will be cleared.
 
 
 - get(vm)
- Returns the status of the customization operation that has been applied for the virtual machine in - vm. This method was added in vSphere API 7.0.3.0.- Parameters
- vm ( - str) – The unique identifier of the virtual machine that needs to be queried. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- The status of the customization operation applied for the virtual machine. 
- Raise
- com.vmware.vapi.std.errors_client.NotFoundIf the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- System.View.
 
 
 - set(vm, spec)
- Applies a customization specification in - specon the virtual machine in- vm. This method only sets the specification settings for the virtual machine. The actual customization happens inside the guest when the virtual machine is powered on. If- spechas None values, then any pending customization settings for the virtual machine are cleared. If there is a pending customization for the virtual machine and- spechas valid content, then the existing customization setting will be overwritten with the new settings. This method was added in vSphere API 7.0.0.0.- Parameters
- vm ( - str) – The unique identifier of the virtual machine that needs to be customized. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Customization.SetSpec) – The customization settings to be applied to the guest operating system.
 
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the customization settings in- specare not valid.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not in a powered off state.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif a customization specification is not found with the unique name in- spec.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundIf the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.Provisioning.Customize.
 
 
 
- class com.vmware.vcenter.vm.guest_client.DhcpConfigInfo(ipv4_enabled=None, ipv6_enabled=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - DhcpConfigInfoclass specifies when Dynamic Host Configuration Protocol is enabled. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- ipv4_enabled ( - bool) – True if IPv4 DHCP is enabled, false otherwise. This attribute was added in vSphere API 7.0.0.0.
- ipv6_enabled ( - bool) – True if IPv6 DHCP is enabled, false otherwise. This attribute was added in vSphere API 7.0.0.0.
 
 
- class com.vmware.vcenter.vm.guest_client.DnsAssignedValues(host_name=None, domain_name=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The {\@name DnsAssignedValues) class describes values assigned by a Domain Name Server (DNS). This class was added in vSphere API 7.0.0.0. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- host_name ( - str) – The host name portion of DNS name. For example, “esx01” part of esx01.example.com. This attribute was added in vSphere API 7.0.0.0.
- domain_name ( - str) – The domain name portion of the DNS name. “example.com” part of esx01.example.com. This attribute was added in vSphere API 7.0.0.0.
 
 
- class com.vmware.vcenter.vm.guest_client.DnsConfigInfo(ip_addresses=None, search_domains=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - DnsConfigInfoclass describes the configuration of RFC 1034 DNS settings. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- ip_addresses ( - listof- str) – The IP addresses of the DNS servers in order of use. IPv4 addresses are specified using dotted decimal notation. For example, “192.0.2.1”. IPv6 addresses are 128-bit addresses represented as eight fields of up to four hexadecimal digits. A colon separates each field (:). For example, 2001:DB8:101::230:6eff:fe04:d9ff. The address can also consist of the symbol ‘::’ to represent multiple 16-bit groups of contiguous 0’s only once in an address as described in RFC 2373. This attribute was added in vSphere API 7.0.0.0.
- search_domains ( - listof- str) – The domain in which to search for hosts, placed in order of preference. These are the domain name portion of the DNS names. This attribute was added in vSphere API 7.0.0.0.
 
 
- class com.vmware.vcenter.vm.guest_client.Environment(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Environmentclass provides methods to manage environment variables in the guest operating system. This class was added in vSphere API 7.0.2.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - get(vm, credentials, name)
- Reads a single environment variable from the guest operating system. - If the authentication uses - Credentials.interactive_session, then the environment being read will be that of the user logged into the desktop. Otherwise it’s the environment of the system user.- . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials.
- name ( - str) – The name of the environment variable to be read.
 
- Return type
- str
- Returns
- The value of the - nameenvironment variable.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the environment variable- nameis not not set in the guest operating system.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the- credentialsare not valid.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Query.
 
 
 - list(vm, credentials, names)
- Reads a list of environment variables from the guest operating system. - If the authentication uses - Credentials.interactive_session, then the environment being read will be that of the user logged into the desktop. Otherwise it’s the environment of the system user.- . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials.
- names ( - setof- str) – The names of the variables to be read. If the- setis empty, then all the environment variables are returned.
 
- Return type
- dictof- strand- str
- Returns
- Mapping from environment variable names to environment variable values, or all environment variables if nothing is specified. If any specified environment variable contained in - namesis not set, then nothing is returned for that variable.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the- credentialsare not valid.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Query.
 
 
 
- class com.vmware.vcenter.vm.guest_client.Identity(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Identityclass provides methods for retrieving guest operating system identification information. This class was added in vSphere API 6.7.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(name=None, family=None, full_name=None, host_name=None, ip_address=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Identity.Infoclass contains information describing the guest operating system identification. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- name ( - com.vmware.vcenter.vm_client.GuestOS) – Guest operating system identifier (short name). This attribute was added in vSphere API 6.7.
- family ( - com.vmware.vcenter.vm_client.GuestOSFamily) – Guest operating system family. This attribute was added in vSphere API 6.7.
- full_name ( - com.vmware.vapi.std_client.LocalizableMessage) – Guest operating system full name. This attribute was added in vSphere API 6.7.
- host_name ( - str) – Hostname of the guest operating system. This attribute was added in vSphere API 6.7.
- ip_address ( - stror- None) – IP address assigned by the guest operating system. This attribute was added in vSphere API 6.7. If None the guest does not have an IP address.
 
 
 - get(vm)
- Return information about the guest. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- guest identification information. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools has not provided any data.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
 
 
- class com.vmware.vcenter.vm.guest_client.LocalFilesystem(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - LocalFilesystemclass provides methods for retrieving information about the guest operating system local file systems. This class was added in vSphere API 6.7.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(capacity=None, free_space=None, filesystem=None, mappings=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - LocalFilesystem.Infoclass contains information about a local file system configured in the guest operating system. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- capacity ( - long) – Total capacity of the file system, in bytes. This attribute was added in vSphere API 6.7.
- free_space ( - long) – Free space on the file system, in bytes. This attribute was added in vSphere API 6.7.
- filesystem ( - stror- None) – Filesystem type, if known. For example, ext3 or NTFS. This attribute was added in vSphere API 7.0.0.0.- setif VMware Tools reports a value.
- mappings ( - listof- LocalFilesystem.VirtualDiskMapping) – VirtualDisks backing the guest partition, if known. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.
 
 
 - class VirtualDiskMapping(disk=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- Describes the virtual disk backing a local guest disk. This class was added in vSphere API 7.0.0.0. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- disk ( - str) – The virtual disk. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
 
 - get(vm)
- Returns details of the local file systems in the guest operating system. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- dictof- strand- LocalFilesystem.Info
- Returns
- Information about the local file systems configured in the guest operating system. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools has not provided any data.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
 
 
- class com.vmware.vcenter.vm.guest_client.Networking(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Networkingclass provides methods for retrieving guest operating system network information. This class was added in vSphere API 7.0.0.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(dns_values=None, dns=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Networking.Infoclass contains information about networking as configured in the guest operating system. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- dns_values ( - DnsAssignedValuesor- None) – Client DNS values. Data assigned by DNS. This attribute was added in vSphere API 7.0.0.0. If None no DNS assigned value exists.
- dns ( - DnsConfigInfoor- None) – Client DNS configuration. How DNS queries are resolved. This attribute was added in vSphere API 7.0.0.0. If None no DNS assigned value exists.
 
 
 - get(vm)
- Returns information about the network configuration in the guest operating system. This method was added in vSphere API 7.0.0.0. - Parameters
- vm ( - str) – Virtual machine ID The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- Information about the networking configuration in the guest operating system. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
 
 
- class com.vmware.vcenter.vm.guest_client.Operations(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- Status of operations in the guest OS. This class was added in vSphere API 7.0.2.0. - Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(guest_operations_ready=None, interactive_guest_operations_ready=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- Guest operating system operation status information. This class was added in vSphere API 7.0.2.0. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- guest_operations_ready ( - bool) – Guest operations availability. Whether or not the virtual machine is ready to process guest operations. This attribute was added in vSphere API 7.0.2.0.
- interactive_guest_operations_ready ( - bool) – Interactive guest operations availability. Whether or not the virtual machine is ready to process interactive guest operations. This attribute was added in vSphere API 7.0.2.0.
 
 
 - get(vm)
- Get information about the guest operation status. This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- guest operations readiness. 
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the state of VMware Tools is unknown.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- System.Read.
 
 
 
- class com.vmware.vcenter.vm.guest_client.Power(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Powerclass provides methods for managing the guest operating system power state of a virtual machine. This class was added in vSphere API 6.7.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(state=None, operations_ready=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- Information about the guest operating system power state. This class was added in vSphere API 6.7. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- state ( - Power.State) – The power state of the guest operating system. This attribute was added in vSphere API 6.7.
- operations_ready ( - bool) – Flag indicating if the virtual machine is ready to process soft power operations. This attribute was added in vSphere API 6.7.
 
 
 - class State(string)
- Bases: - vmware.vapi.bindings.enum.Enum- Possible guest power states. This enumeration was added in vSphere API 6.7. - Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- Stateinstance.
 - NOT_RUNNING = State(string='NOT_RUNNING')
- The guest OS is not running. This class attribute was added in vSphere API 6.7. 
 - RESETTING = State(string='RESETTING')
- The guest OS is resetting. This class attribute was added in vSphere API 6.7. 
 - RUNNING = State(string='RUNNING')
- The guest OS is running. This class attribute was added in vSphere API 6.7. 
 - SHUTTING_DOWN = State(string='SHUTTING_DOWN')
- The guest OS is shutting down. This class attribute was added in vSphere API 6.7. 
 - STANDBY = State(string='STANDBY')
- The guest OS is in standby. This class attribute was added in vSphere API 6.7. 
 - UNAVAILABLE = State(string='UNAVAILABLE')
- The guest OS power state is unknown. This class attribute was added in vSphere API 6.7. 
 
 - get(vm)
- Returns information about the guest operating system power state. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- Guest OS powerstate information. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
 
 - reboot(vm)
- Issues a request to the guest operating system asking it to perform a reboot. This request returns immediately and does not wait for the guest operating system to complete the operation. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).
 
 - shutdown(vm)
- Issues a request to the guest operating system asking it to perform a clean shutdown of all services. This request returns immediately and does not wait for the guest operating system to complete the operation. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is suspended.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).
 
 - standby(vm)
- Issues a request to the guest operating system asking it to perform a suspend operation. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual machine is suspended.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif VMware Tools is not running.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).
 
 
- class com.vmware.vcenter.vm.guest_client.Processes(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Processesclass provides methods to manage processes in the guest operating system. This class was added in vSphere API 7.0.2.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class CreateSpec(path=None, arguments=None, working_directory=None, environment_variables=None, start_minimized=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Processes.CreateSpecclass describes the arguments to- Processes.create(). This class was added in vSphere API 7.0.2.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- path ( - str) –- The absolute path to the program to start. - For Linux guest operating systems, /bin/bash is used to start the program. - For Solaris guest operating systems, if /bin/bash exists, its used to start the program, otherwise /bin/sh is used. If /bin/sh is used, then the process ID returned by - Processes.create()will be that of the shell used to start the program, rather than the program itself, due to the differences in how /bin/sh and /bin/bash work. This PID will still be usable for watching the process with- Processes.list()to find its exit code and elapsed time.- For Windows, no shell is used. Using a simple batch file instead by prepending - c:\windows\system32\cmd.exe /cwill allow stdio redirection to work if passed in the- argumentsparameter.. This attribute was added in vSphere API 7.0.2.0.
- arguments ( - stror- None) –- The arguments to the program. - Characters which must be escaped to the shell should also be escaped in - arguments.- In Linux and Solaris guest operating systems, stdio redirection arguments may be used. - For Windows, stdio redirection can be added to the argments if - pathis prefixed with- c:\windows\system32\cmd.exe /c.. This attribute was added in vSphere API 7.0.2.0. If None no arguments are passed to the program.
- working_directory ( - stror- None) – The absolute path of the working directory for the program to be run. VMware recommends explicitly setting the working directory for the program to be run. This attribute was added in vSphere API 7.0.2.0. If None or is an empty string, the behavior depends on the guest operating system. For Linux guest operating systems, if None or is an empty string, the working directory will be the home directory of the user associated with the guest authentication. For other guest operating systems, if None, the behavior is unspecified.
- environment_variables (( - dictof- strand- str) or- None) – A map of environment variables, specified using the guest OS rules (for example- PATH, c:in;c:\windows\system32or- LD_LIBRARY_PATH,/usr/lib:/lib), to be set for the program being run. Note that these are not additions to the default environment variables; they define the complete set available to the program. This attribute was added in vSphere API 7.0.2.0. If None, the environment variables used are guest dependent defaults.
- start_minimized ( - boolor- None) – Makes any program window start minimized in Windows operating systems. Returns an error if- setfor non-Windows guests. This attribute was added in vSphere API 7.0.2.0. Defaults to false.
 
 
 - class Info(name=None, owner=None, command=None, started=None, finished=None, exit_code=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Processes.Infoclass describes the state of a guest process. This class was added in vSphere API 7.0.2.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- name ( - str) – The process name. This attribute was added in vSphere API 7.0.2.0.
- owner ( - str) – The process owner. This attribute was added in vSphere API 7.0.2.0.
- command ( - str) – The full command line of the process. This attribute was added in vSphere API 7.0.2.0.
- started ( - datetime.datetime) – The start time of the process. This attribute was added in vSphere API 7.0.2.0.
- finished ( - datetime.datetimeor- None) – If the process was started using- Processes.create()then the process completion time will be available if queried within 5 minutes after it completes. This attribute was added in vSphere API 7.0.2.0. Set if the process was started with- Processes.create()and has recently exited.
- exit_code ( - longor- None) – If the process was started using- Processes.create()then the process exit code will be available if queried within 5 minutes after it completes. This attribute was added in vSphere API 7.0.2.0. Set if the process was started with- Processes.create()and has recently exited.
 
 
 - class ProcessErrorDetails(pid=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Processes.ProcessErrorDetailsclass describes additional error information for process operations. This class was added in vSphere API 7.0.2.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- pid ( - long) – The process associated with the error. This attribute was added in vSphere API 7.0.2.0.
 
 - class Summary(name=None, pid=None, owner=None, command=None, started=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Processes.Summaryclass describes the state of a guest process. This class was added in vSphere API 7.0.2.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- name ( - str) – The process name. This attribute was added in vSphere API 7.0.2.0.
- pid ( - long) – The process ID. This attribute was added in vSphere API 7.0.2.0.
- owner ( - str) – The process owner. This attribute was added in vSphere API 7.0.2.0.
- command ( - str) – The full command line of the process. This attribute was added in vSphere API 7.0.2.0.
- started ( - datetime.datetime) – The start time of the process. This attribute was added in vSphere API 7.0.2.0.
 
 
 - create(vm, credentials, spec)
- Starts a program in the guest operating system. - A process started this way can have its status queried with - Processes.list()or- Processes.get(). When the process completes, its exit code and end time will be available for 5 minutes after completion.- . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials. The program will be run as the user associated with this data.
- spec ( - Processes.CreateSpec) – The arguments describing the program to be started.
 
- Return type
- long
- Returns
- The process id of the program started. 
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the- Processes.CreateSpec.start_minimizedattribute is set and the guest is not a Windows operating system.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the program path is not a valid path. The value of- com.vmware.vapi.std.errors_client.Error.datawill contain all the attributes defined in the- com.vmware.vcenter.vm.guest.filesystem_client.FileErrorDetailsproviding additional information about the failure.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the working directory is not a valid directory. The value of- com.vmware.vapi.std.errors_client.Error.datawill contain all the attributes defined in the- com.vmware.vcenter.vm.guest.filesystem_client.FileErrorDetailsproviding additional information about the failure.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the program path does not exist. The value of- com.vmware.vapi.std.errors_client.Error.datawill contain all the attributes defined in the- com.vmware.vcenter.vm.guest.filesystem_client.FileErrorDetailsproviding additional information about the failure.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the program fails to start.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the- credentialswas not valid.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the- pathattribute of- speccannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the- pathattribute of- speccannot be run because- credentialswill not allow the operation.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Execute.
 
 
 - delete(vm, credentials, pid)
- Terminates a process in the guest OS. - On Posix guests, the process is sent a SIGTERM signal. If that doesn’t terminate the process, a SIGKILL signal is sent. A process may still be running if it’s stuck. - . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials.
- pid ( - long) – Process ID of the process to be terminated
 
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the- pidis not found. The value of- com.vmware.vapi.std.errors_client.Error.datawill contain all the attributes defined in the- Processes.ProcessErrorDetailsproviding additional information about the failure.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif- credentialsis not valid.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif- credentialsdoes not have permission to terminate the process.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Execute.
 
 
 - get(vm, credentials, pid)
- Returns the status of a process running in the guest operating system, including those started by - Processes.create()that may have recently completed.- . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials.
- pid ( - long) – Specifies the process to query.
 
- Return type
- Returns
- The for the process with id - pid.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the process- pidis not found. The value of- com.vmware.vapi.std.errors_client.Error.datawill contain all the attributes defined in the- Processes.ProcessErrorDetailsproviding additional information about the failure.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the- credentialsis not valid.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Query.
 
 
 - list(vm, credentials)
- List the processes running in the guest operating system, plus those started by - Processes.create()that have recently completed.- . This method was added in vSphere API 7.0.2.0. - Parameters
- vm ( - str) – Virtual machine to perform the operation on. The parameter must be an identifier for the resource type:- VirtualMachine.
- credentials ( - Credentials) – The guest authentication data. See- Credentials.
 
- Return type
- Returns
- The list of running processes is returned in an array of classes. 
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine- vmis not running.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine- vmis not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the VMware tools are not running.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the- credentialsis not valid.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is not supported by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the operation is disabled by the VMware tools in the guest OS.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- The resource - VirtualMachinereferenced by the parameter- vmrequires- VirtualMachine.GuestOperations.Query.
 
 
 
- class com.vmware.vcenter.vm.guest_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.vm.hardware_client module
The com.vmware.vcenter.vm.hardware_client module provides classes for
managing the virtual hardware configuration and state of a virtual machine.
This includes methods for reading and manipulating virtual device configuration
and for querying the runtime state of the devices.
- class com.vmware.vcenter.vm.hardware_client.Boot(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Bootclass provides methods for configuring the settings used when booting a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class CreateSpec(type=None, efi_legacy_boot=None, network_protocol=None, delay=None, retry=None, retry_delay=None, enter_setup_mode=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Boot.CreateSpecclass describes settings used when booting a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Boot.Typeor- None) – Firmware type to be used by the virtual machine. If None, defaults to value that is recommended for the guest OS and is supported for the virtual hardware version.
- efi_legacy_boot ( - boolor- None) – Flag indicating whether to use EFI legacy boot mode. If None, defaults to value that is recommended for the guest OS and is supported for the virtual hardware version.
- network_protocol ( - Boot.NetworkProtocolor- None) – Protocol to use when attempting to boot the virtual machine over the network. If None, defaults to a system defined default value.
- delay ( - longor- None) – Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode. If None, default value is 0.
- retry ( - boolor- None) – Flag indicating whether the virtual machine should automatically retry the boot process after a failure. If None, default value is false.
- retry_delay ( - longor- None) – Delay in milliseconds before retrying the boot process after a failure; applicable only when- Boot.Info.retryis true. If None, default value is 10000.
- enter_setup_mode ( - boolor- None) – Flag indicating whether the firmware boot process should automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode. If None, the value is unchanged.
 
 
 - class Info(type=None, efi_legacy_boot=None, network_protocol=None, delay=None, retry=None, retry_delay=None, enter_setup_mode=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Boot.Infoclass contains information about the virtual machine boot process.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Boot.Type) – Firmware type used by the virtual machine.
- efi_legacy_boot ( - bool) – Flag indicating whether to use EFI legacy boot mode. This attribute is optional and it is only relevant when the value of- typeis- Boot.Type.EFI.
- network_protocol ( - Boot.NetworkProtocol) – Protocol to use when attempting to boot the virtual machine over the network. This attribute is optional and it is only relevant when the value of- typeis- Boot.Type.EFI.
- delay ( - long) – Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode.
- retry ( - bool) – Flag indicating whether the virtual machine will automatically retry the boot process after a failure.
- retry_delay ( - long) – Delay in milliseconds before retrying the boot process after a failure; applicable only when- Boot.Info.retryis true.
- enter_setup_mode ( - bool) – Flag indicating whether the firmware boot process will automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode.
 
 
 - class NetworkProtocol(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Boot.NetworkProtocolclass defines the valid network boot protocols supported when booting a virtual machine with- Boot.Type.EFIfirmware over the network.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- NetworkProtocolinstance.
 - IPV4 = NetworkProtocol(string='IPV4')
- PXE or Apple NetBoot over IPv4. 
 - IPV6 = NetworkProtocol(string='IPV6')
- PXE over IPv6. 
 
 - class Type(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Boot.Typeclass defines the valid firmware types for a virtual machine.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- Typeinstance.
 - BIOS = Type(string='BIOS')
- Basic Input/Output System (BIOS) firmware. 
 - EFI = Type(string='EFI')
- Extensible Firmware Interface (EFI) firmware. 
 
 - class UpdateSpec(type=None, efi_legacy_boot=None, network_protocol=None, delay=None, retry=None, retry_delay=None, enter_setup_mode=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Boot.UpdateSpecclass describes the updates to the settings used when booting a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Boot.Typeor- None) – Firmware type to be used by the virtual machine. If None, the value is unchanged.
- efi_legacy_boot ( - boolor- None) – Flag indicating whether to use EFI legacy boot mode. If None, the value is unchanged.
- network_protocol ( - Boot.NetworkProtocolor- None) – Protocol to use when attempting to boot the virtual machine over the network. If None, the value is unchanged.
- delay ( - longor- None) – Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode. If None, the value is unchanged.
- retry ( - boolor- None) – Flag indicating whether the virtual machine should automatically retry the boot process after a failure. If None, the value is unchanged.
- retry_delay ( - longor- None) – Delay in milliseconds before retrying the boot process after a failure; applicable only when- Boot.Info.retryis true. If None, the value is unchanged.
- enter_setup_mode ( - boolor- None) – Flag indicating whether the firmware boot process should automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode. If None, the value is unchanged.
 
 
 - get(vm)
- Returns the boot-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- Boot-related settings of the virtual machine. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, spec)
- Updates the boot-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Boot.UpdateSpec) – Specification for updating the boot-related settings of the virtual machine.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif one of the provided settings is not permitted; for example, specifying a negative value for- delay.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.Cdrom(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Cdromclass provides methods for configuring the virtual CD-ROM devices of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, iso_file=None, host_device=None, auto_detect=None, device_access_type=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.BackingInfoclass contains information about the physical resource backing a virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Cdrom.BackingType) – Backing type for the virtual CD-ROM device.
- iso_file ( - str) – Path of the image file backing the virtual CD-ROM device. This attribute is optional and it is only relevant when the value of- typeis- Cdrom.BackingType.ISO_FILE.
- host_device ( - stror- None) – Name of the host device backing the virtual CD-ROM device. This attribute will be None if- autoDetectis true and the virtual CD-ROM device is not connected or no suitable device is available on the host.
- auto_detect ( - bool) – Flag indicating whether the virtual CD-ROM device is configured to automatically detect a suitable host device. This attribute is optional and it is only relevant when the value of- typeis- Cdrom.BackingType.HOST_DEVICE.
- device_access_type ( - Cdrom.DeviceAccessType) – Access type for the device backing. This attribute is optional and it is only relevant when the value of- typeis one of- Cdrom.BackingType.HOST_DEVICEor- Cdrom.BackingType.CLIENT_DEVICE.
 
 
 - class BackingSpec(type=None, iso_file=None, host_device=None, device_access_type=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.BackingSpecclass provides a specification of the physical resource backing a virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Cdrom.BackingType) – Backing type for the virtual CD-ROM device.
- iso_file ( - str) – Path of the image file that should be used as the virtual CD-ROM device backing. This attribute is optional and it is only relevant when the value of- typeis- Cdrom.BackingType.ISO_FILE.
- host_device ( - stror- None) – Name of the device that should be used as the virtual CD-ROM device backing. If None, the virtual CD-ROM device will be configured to automatically detect a suitable host device.
- device_access_type ( - Cdrom.DeviceAccessTypeor- None) – Access type for the device backing. If None, defaults to- Cdrom.DeviceAccessType.EMULATION.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Cdrom.BackingTypeclass defines the valid backing types for a virtual CD-ROM device.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - CLIENT_DEVICE = BackingType(string='CLIENT_DEVICE')
- Virtual CD-ROM device is backed by a device on the client that is connected to the virtual machine console. 
 - HOST_DEVICE = BackingType(string='HOST_DEVICE')
- Virtual CD-ROM device is backed by a device on the host where the virtual machine is running. 
 - ISO_FILE = BackingType(string='ISO_FILE')
- Virtual CD-ROM device is backed by an ISO file. 
 
 - class CreateSpec(type=None, ide=None, sata=None, backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.CreateSpecclass provides a specification for the configuration of a newly-created virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Cdrom.HostBusAdapterTypeor- None) – Type of host bus adapter to which the device should be attached. If None, guest-specific default values will be used
- ide ( - IdeAddressSpecor- None) – Address for attaching the device to a virtual IDE adapter. If None, the server will choose an available address; if none is available, the request will fail.
- sata ( - SataAddressSpecor- None) – Address for attaching the device to a virtual SATA adapter. If None, the server will choose an available address; if none is available, the request will fail.
- backing ( - Cdrom.BackingSpecor- None) – Physical resource backing for the virtual CD-ROM device. If None, defaults to automatic detection of a suitable host device.
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
 - class DeviceAccessType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Cdrom.DeviceAccessTypeclass defines the valid device access types for a physical device packing of a virtual CD-ROM device.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- DeviceAccessTypeinstance.
 - EMULATION = DeviceAccessType(string='EMULATION')
- ATAPI or SCSI device emulation. 
 - PASSTHRU = DeviceAccessType(string='PASSTHRU')
- Raw passthru device access. 
 - PASSTHRU_EXCLUSIVE = DeviceAccessType(string='PASSTHRU_EXCLUSIVE')
- Raw passthru device access, with exclusive access to the device. 
 
 - class HostBusAdapterType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Cdrom.HostBusAdapterTypeclass defines the valid types of host bus adapters that may be used for attaching a Cdrom to a virtual machine.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- HostBusAdapterTypeinstance.
 - IDE = HostBusAdapterType(string='IDE')
- Cdrom is attached to an IDE adapter. 
 - SATA = HostBusAdapterType(string='SATA')
- Cdrom is attached to a SATA adapter. 
 
 - class Info(type=None, label=None, ide=None, sata=None, backing=None, state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.Infoclass contains information about a virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Cdrom.HostBusAdapterType) – Type of host bus adapter to which the device is attached.
- label ( - str) – Device label.
- ide ( - IdeAddressInfo) – Address of device attached to a virtual IDE adapter. This attribute is optional and it is only relevant when the value of- typeis- Cdrom.HostBusAdapterType.IDE.
- sata ( - SataAddressInfo) – Address of device attached to a virtual SATA adapter. This attribute is optional and it is only relevant when the value of- typeis- Cdrom.HostBusAdapterType.SATA.
- backing ( - Cdrom.BackingInfo) – Physical resource backing for the virtual CD-ROM device.
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.Cdrom'
- Resource type for the virtual CD-ROM device. 
 - class Summary(cdrom=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.Summaryclass contains commonly used information about a virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- cdrom ( - str) – Identifier of the virtual CD-ROM device. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
 
 - class UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cdrom.UpdateSpecclass describes the updates to be made to the configuration of a virtual CD-ROM device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Cdrom.BackingSpecor- None) –- Physical resource backing for the virtual CD-ROM device. - This attribute may only be modified if the virtual machine is not powered on or the virtual CD-ROM device is not connected. If None, the value is unchanged. 
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
 - connect(vm, cdrom)
- Connects a virtual CD-ROM device of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. - For a powered-off virtual machine, the - Cdrom.update()method may be used to configure the virtual CD-ROM device to start in the connected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- cdrom ( - str) – Virtual CD-ROM device identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual CD-ROM device is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual CD-ROM device is already connected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - create(vm, spec)
- Adds a virtual CD-ROM device to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Cdrom.CreateSpec) – Specification for the new virtual CD-ROM device.
 
- Return type
- str
- Returns
- Virtual CD-ROM device identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.Cdrom.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reported that the CD-ROM device was created but was unable to confirm the creation because the identifier of the new device could not be determined.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is suspended or if the virtual machine is powered on and virtual CD-ROM type is IDE.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the specified storage address is unavailable; for example, if the SCSI adapter requested does not exist.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInUseif the specified storage address is in use.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the specified storage address is out of bounds.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the guest operating system of the virtual machine is not supported and spec includes None attributes that default to guest-specific values.
 
 - delete(vm, cdrom)
- Removes a virtual CD-ROM device from the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- cdrom ( - str) – Virtual CD-ROM device identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual CD-ROM device is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is suspended or if the virtual machine is powered on and virtual CD-ROM type is IDE.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - disconnect(vm, cdrom)
- Disconnects a virtual CD-ROM device of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the CD-ROM device is not connected to its backing resource. - For a powered-off virtual machine, the - Cdrom.update()method may be used to configure the virtual CD-ROM device to start in the disconnected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- cdrom ( - str) – Virtual CD-ROM device identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual CD-ROM device is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual CD-ROM device is already disconnected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, cdrom)
- Returns information about a virtual CD-ROM device. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- cdrom ( - str) – Virtual CD-ROM device identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
 
- Return type
- Returns
- Information about the specified virtual CD-ROM device. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual CD-ROM device is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual CD-ROM devices belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- List of commonly used information about virtual CD-ROM devices. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, cdrom, spec)
- Updates the configuration of a virtual CD-ROM device. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- cdrom ( - str) – Virtual CD-ROM device identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Cdrom.
- spec ( - Cdrom.UpdateSpec) – Specification for updating the virtual CD-ROM device.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual CD-ROM device is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif one or more of the attributes specified in the- specparameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual CD-ROM device.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.ConnectionCreateSpec(start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - ConnectionCreateSpecclass provides a specification for the configuration of a newly-created removable device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
- class com.vmware.vcenter.vm.hardware_client.ConnectionInfo(state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - ConnectionInfoclass provides information about the state and configuration of a removable virtual device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
- class com.vmware.vcenter.vm.hardware_client.ConnectionState(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - ConnectionStateclass defines the valid states for a removable device that is configured to be connected.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- ConnectionStateinstance.
 - CONNECTED = ConnectionState(string='CONNECTED')
- The device is connected and working correctly. 
 - NOT_CONNECTED = ConnectionState(string='NOT_CONNECTED')
- The device is not connected. 
 - RECOVERABLE_ERROR = ConnectionState(string='RECOVERABLE_ERROR')
- Device connection failed due to a recoverable error; for example, the virtual device backing is currently in use by another virtual machine. 
 - UNKNOWN = ConnectionState(string='UNKNOWN')
- The device status is unknown. 
 - UNRECOVERABLE_ERROR = ConnectionState(string='UNRECOVERABLE_ERROR')
- Device connection failed due to an unrecoverable error; for example, the virtual device backing does not exist. 
 
- class com.vmware.vcenter.vm.hardware_client.ConnectionUpdateSpec(start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - ConnectionUpdateSpecclass describes the updates to be made to the configuration of a removable virtual device.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
- class com.vmware.vcenter.vm.hardware_client.Cpu(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Cpuclass provides methods for configuring the CPU settings of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(count=None, cores_per_socket=None, hot_add_enabled=None, hot_remove_enabled=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cpu.Infoclass contains CPU-related information about a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- count ( - long) – Number of CPU cores.
- cores_per_socket ( - long) – Number of CPU cores per socket.
- hot_add_enabled ( - bool) – Flag indicating whether adding CPUs while the virtual machine is running is enabled.
- hot_remove_enabled ( - bool) – Flag indicating whether removing CPUs while the virtual machine is running is enabled.
 
 
 - class UpdateSpec(count=None, cores_per_socket=None, hot_add_enabled=None, hot_remove_enabled=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Cpu.UpdateSpecclass describes the updates to be made to the CPU-related settings of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- count ( - longor- None) –- New number of CPU cores. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. - The supported range of CPU counts is constrained by the configured guest operating system and virtual hardware version of the virtual machine. - If the virtual machine is running, the number of CPU cores may only be increased if - Cpu.Info.hot_add_enabledis true, and may only be decreased if- Cpu.Info.hot_remove_enabledis true. If None, the value is unchanged.
- cores_per_socket ( - longor- None) – New number of CPU cores per socket. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. If None, the value is unchanged.
- hot_add_enabled ( - boolor- None) –- Flag indicating whether adding CPUs while the virtual machine is running is enabled. - This attribute may only be modified if the virtual machine is powered off. If None, the value is unchanged. 
- hot_remove_enabled ( - boolor- None) –- Flag indicating whether removing CPUs while the virtual machine is running is enabled. - This attribute may only be modified if the virtual machine is powered off. If None, the value is unchanged. 
 
 
 - get(vm)
- Returns the CPU-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- CPU-related settings of the virtual machine. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, spec)
- Updates the CPU-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Cpu.UpdateSpec) – Specification for updating the CPU-related settings of the virtual machine.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif one of the provided settings is not permitted; for example, specifying a negative value for- count.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif- hotAddEnabledor- hotRemoveEnabledis specified and the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif- countis specified and is greater than- count,- hotAddEnabledis false, and the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif- countis specified and is less than- count,- hotRemoveEnabledis false, and the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.Disk(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Diskclass 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- 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- Disk.delete()method provides the ability to detach a VMDK file from the virtual machine. The- 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.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, vmdk_file=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.BackingInfoclass contains information about the physical resource backing a virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Disk.BackingType) – Backing type for the virtual disk.
- vmdk_file ( - str) – Path of the VMDK file backing the virtual disk. This attribute is optional and it is only relevant when the value of- typeis- Disk.BackingType.VMDK_FILE.
 
 
 - class BackingSpec(type=None, vmdk_file=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.BackingSpecclass provides a specification of the physical resource backing a virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Disk.BackingType) – Backing type for the virtual disk.
- vmdk_file ( - str) – Path of the VMDK file backing the virtual disk. This attribute is optional and it is only relevant when the value of- typeis- Disk.BackingType.VMDK_FILE.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Disk.BackingTypeclass defines the valid backing types for a virtual disk.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - VMDK_FILE = BackingType(string='VMDK_FILE')
- Virtual disk is backed by a VMDK file. 
 
 - class CreateSpec(type=None, ide=None, scsi=None, sata=None, nvme=None, backing=None, new_vmdk=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.CreateSpecclass provides a specification for the configuration of a newly-created virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Disk.HostBusAdapterTypeor- None) – Type of host bus adapter to which the device should be attached. If None, guest-specific default values will be used
- ide ( - IdeAddressSpecor- None) – Address for attaching the device to a virtual IDE adapter. If None, the server will choose an available address; if none is available, the request will fail.
- scsi ( - ScsiAddressSpecor- None) – Address for attaching the device to a virtual SCSI adapter. If None, the server will choose an available address; if none is available, the request will fail.
- sata ( - SataAddressSpecor- None) – Address for attaching the device to a virtual SATA adapter. If None, the server will choose an available address; if none is available, the request will fail.
- nvme ( - NvmeAddressSpecor- None) – Address for attaching the device to a virtual NVMe adapter. This attribute was added in vSphere API 7.0.0.1. If None, the server will choose an available address; if none is available, the request will fail.
- backing ( - Disk.BackingSpecor- None) – Existing physical resource backing for the virtual disk. Exactly one of- backingor- newVmdkmust be specified. If None, the virtual disk will not be connected to an existing backing.
- new_vmdk ( - Disk.VmdkCreateSpecor- None) – Specification for creating a new VMDK backing for the virtual disk. Exactly one of- backingor- newVmdkmust be specified. If None, a new VMDK backing will not be created.
 
 
 - class HostBusAdapterType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Disk.HostBusAdapterTypeclass defines the valid types of host bus adapters that may be used for attaching a virtual storage device to a virtual machine.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- HostBusAdapterTypeinstance.
 - IDE = HostBusAdapterType(string='IDE')
- Disk is attached to an IDE adapter. 
 - NVME = HostBusAdapterType(string='NVME')
- Disk is attached to a NVMe adapter. This class attribute was added in vSphere API 7.0.0.1. 
 - SATA = HostBusAdapterType(string='SATA')
- Disk is attached to a SATA adapter. 
 - SCSI = HostBusAdapterType(string='SCSI')
- Disk is attached to a SCSI adapter. 
 
 - class Info(label=None, type=None, ide=None, scsi=None, sata=None, nvme=None, backing=None, capacity=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.Infoclass contains information about a virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- label ( - str) – Device label.
- type ( - Disk.HostBusAdapterType) – Type of host bus adapter to which the device is attached.
- ide ( - IdeAddressInfo) – Address of device attached to a virtual IDE adapter. Workaround for PR1459646
- scsi ( - ScsiAddressInfo) – Address of device attached to a virtual SCSI adapter. Workaround for PR1459646
- sata ( - SataAddressInfo) – Address of device attached to a virtual SATA adapter. Workaround for PR1459646
- nvme ( - NvmeAddressInfo) – Address of device attached to a virtual NVMe adapter. This attribute was added in vSphere API 7.0.0.1. This attribute is optional and it is only relevant when the value of- typeis- Disk.HostBusAdapterType.NVME.
- backing ( - Disk.BackingInfo) – Physical resource backing for the virtual disk.
- capacity ( - longor- None) – Capacity of the virtual disk in bytes. If None, virtual disk is inaccessible or disk capacity is 0.
 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.Disk'
- Resource type for the virtual disk. 
 - class StoragePolicySpec(policy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.StoragePolicySpecclass contains information about the storage policy be associated with a VMDK file. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- policy ( - str) – Identifier of the storage policy which should be associated with the VMDK file. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy.
 
 - class Summary(disk=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.Summaryclass contains commonly used information about a virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- disk ( - str) – Identifier of the virtual Disk. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
 
 - class UpdateSpec(backing=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.UpdateSpecclass describes the updates to be made to the configuration of a virtual disk.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Disk.BackingSpecor- None) –- Physical resource backing for the virtual disk. - This attribute may only be modified if the virtual machine is not powered on. If None, the value is unchanged. 
 
 - class VmdkCreateSpec(name=None, capacity=None, storage_policy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Disk.VmdkCreateSpecclass provides a specification for creating a new VMDK file to be used as a backing for a virtual disk. The virtual disk will be stored in the same directory as the virtual machine’s configuration file.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- name ( - stror- None) – Base name of the VMDK file. The name should not include the ‘.vmdk’ file extension. If None, a name (derived from the name of the virtual machine) will be chosen by the server.
- capacity ( - longor- None) – Capacity of the virtual disk backing in bytes. If None, defaults to a guest-specific capacity.
- storage_policy ( - Disk.StoragePolicySpecor- None) – The- Disk.StoragePolicySpecclass contains information about the storage policy that is to be associated the with VMDK file. This attribute was added in vSphere API 6.7. If None the default storage policy of the target datastore (if applicable) is applied. Currently a default storage policy is only supported by object based datastores : VVol & vSAN. For non- object datastores, if None then no storage policy would be associated with the VMDK file.
 
 
 - create(vm, spec)
- 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. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Disk.CreateSpec) – Specification for the new virtual disk.
 
- Return type
- str
- Returns
- Virtual disk identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.Disk.
- Raise
- com.vmware.vapi.std.errors_client.Errorif 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.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is suspended or if the virtual machine is powered on and virtual disk type is IDE.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the specified storage address is unavailable; for example, if the SCSI adapter requested does not exist.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInUseif the specified storage address is in use.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the specified storage address is out of bounds or if the specified storage policy is invalid.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the guest operating system of the virtual machine is not supported and spec includes None attributes that default to guest-specific values.
 
 - delete(vm, disk)
- 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. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- disk ( - str) – Virtual disk identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual disk is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is suspended or if the virtual machine is powered on and virtual disk type is IDE.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, disk)
- Returns information about a virtual disk. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- disk ( - str) – Virtual disk identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
 
- Return type
- Returns
- Information about the specified virtual disk. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual disk is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual disks belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- listof- Disk.Summary
- Returns
- List of commonly used information about the virtual disks. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, disk, spec)
- 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. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- disk ( - str) – Virtual disk identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
- spec ( - Disk.UpdateSpec) – Specification for updating the virtual disk.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual disk is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif one or more of the attributes specified in the- specparameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual disk.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.Ethernet(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Ethernetclass provides methods for configuring the virtual Ethernet adapters of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, network=None, network_name=None, host_device=None, distributed_switch_uuid=None, distributed_port=None, connection_cookie=None, opaque_network_type=None, opaque_network_id=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.BackingInfoclass contains information about the physical resource backing a virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Ethernet.BackingType) – Backing type for the virtual Ethernet adapter.
- network ( - stror- None) – Identifier of the network backing the virtual Ethernet adapter. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- Network. If None, the identifier of the network backing could not be determined.
- network_name ( - str) – Name of the standard portgroup backing the virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.BackingType.STANDARD_PORTGROUP.
- host_device ( - str) – Name of the device backing the virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.BackingType.HOST_DEVICE.
- distributed_switch_uuid ( - str) – UUID of the distributed virtual switch that backs the virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.BackingType.DISTRIBUTED_PORTGROUP.
- distributed_port ( - stror- None) – Key of the distributed virtual port that backs the virtual Ethernet adapter. This attribute will be None if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.
- connection_cookie ( - longor- None) – Server-generated cookie that identifies the connection to the port. This ookie may be used to verify that the virtual machine is the rightful owner of the port. This attribute will be None if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.
- opaque_network_type ( - str) – Type of the opaque network that backs the virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.BackingType.OPAQUE_NETWORK.
- opaque_network_id ( - str) – Identifier of the opaque network that backs the virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.BackingType.OPAQUE_NETWORK.
 
 
 - class BackingSpec(type=None, network=None, distributed_port=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.BackingSpecclass provides a specification of the physical resource that backs a virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Ethernet.BackingType) – Backing type for the virtual Ethernet adapter.
- network ( - str) – Identifier of the network that backs the virtual Ethernet adapter. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- Network. This attribute is optional and it is only relevant when the value of- typeis one of- Ethernet.BackingType.STANDARD_PORTGROUP,- Ethernet.BackingType.DISTRIBUTED_PORTGROUP, or- Ethernet.BackingType.OPAQUE_NETWORK.
- distributed_port ( - stror- None) – Key of the distributed virtual port that backs the virtual Ethernet adapter. Depending on the type of the Portgroup, the port may be specified using this field. If the portgroup type is early-binding (also known as static), a port is assigned when the Ethernet adapter is configured to use the port. The port may be either automatically or specifically assigned based on the value of this attribute. If the portgroup type is ephemeral, the port is created and assigned to a virtual machine when it is powered on and the Ethernet adapter is connected. This attribute cannot be specified as no free ports exist before use. May be used to specify a port when the network specified on the- networkattribute is a static or early binding distributed portgroup. If None, the port will be automatically assigned to the Ethernet adapter based on the policy embodied by the portgroup type.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Ethernet.BackingTypeclass defines the valid backing types for a virtual Ethernet adapter.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - DISTRIBUTED_PORTGROUP = BackingType(string='DISTRIBUTED_PORTGROUP')
- Distributed virtual switch backing. 
 - HOST_DEVICE = BackingType(string='HOST_DEVICE')
- Legacy host device network backing. Imported VMs may have virtual Ethernet adapters with this type of backing, but this type of backing cannot be used to create or to update a virtual Ethernet adapter. 
 - OPAQUE_NETWORK = BackingType(string='OPAQUE_NETWORK')
- Opaque network backing. 
 - STANDARD_PORTGROUP = BackingType(string='STANDARD_PORTGROUP')
- vSphere standard portgroup network backing. 
 
 - class CreateSpec(type=None, upt_compatibility_enabled=None, mac_type=None, mac_address=None, pci_slot_number=None, wake_on_lan_enabled=None, backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.CreateSpecclass provides a specification for the configuration of a newly-created virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Ethernet.EmulationTypeor- None) – Ethernet adapter emulation type. If None, defaults to a guest-specific type.
- upt_compatibility_enabled ( - boolor- None) – Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter. If None, UPT will not be enabled on the newly-created virtual Ethernet adapter.
- mac_type ( - Ethernet.MacAddressTypeor- None) – MAC address type. If None, defaults to- Ethernet.MacAddressType.GENERATED.
- mac_address ( - str) – MAC address. Workaround for PR1459647
- pci_slot_number ( - longor- None) – Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change when it the VM is started or as the device is hot added. If None, the server will choose an available address when the virtual machine is powered on.
- wake_on_lan_enabled ( - boolor- None) – Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter. Defaults to false if None.
- backing ( - Ethernet.BackingSpecor- None) – Physical resource backing for the virtual Ethernet adapter. If None, the system may try to find an appropriate backing. If one is not found, the request will fail.
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
 - class EmulationType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Ethernet.EmulationTypeclass defines the valid emulation types for a virtual Ethernet adapter.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- EmulationTypeinstance.
 - E1000 = EmulationType(string='E1000')
- E1000 ethernet adapter. 
 - E1000E = EmulationType(string='E1000E')
- E1000e ethernet adapter. 
 - PCNET32 = EmulationType(string='PCNET32')
- AMD Lance PCNet32 Ethernet adapter. 
 - VMXNET = EmulationType(string='VMXNET')
- VMware Vmxnet virtual Ethernet adapter. 
 - VMXNET2 = EmulationType(string='VMXNET2')
- VMware Vmxnet2 virtual Ethernet adapter. 
 - VMXNET3 = EmulationType(string='VMXNET3')
- VMware Vmxnet3 virtual Ethernet adapter. 
 
 - class Info(label=None, type=None, upt_compatibility_enabled=None, mac_type=None, mac_address=None, pci_slot_number=None, wake_on_lan_enabled=None, backing=None, state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.Infoclass contains information about a virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- label ( - str) – Device label.
- type ( - Ethernet.EmulationType) – Ethernet adapter emulation type.
- upt_compatibility_enabled ( - bool) – Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter. This attribute is optional and it is only relevant when the value of- typeis- Ethernet.EmulationType.VMXNET3.
- mac_type ( - Ethernet.MacAddressType) – MAC address type.
- mac_address ( - stror- None) – MAC address. May be None if- Ethernet.Info.mac_typeis- Ethernet.MacAddressType.MANUALand has not been specified, or if- Ethernet.Info.mac_typeis- Ethernet.MacAddressType.GENERATEDand the virtual machine has never been powered on since the Ethernet adapter was created.
- pci_slot_number ( - longor- None) – Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added. May be None if the virtual machine has never been powered on since the adapter was created.
- wake_on_lan_enabled ( - bool) – Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter.
- backing ( - Ethernet.BackingInfo) – Physical resource backing for the virtual Ethernet adapter.
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
 - class MacAddressType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Ethernet.MacAddressTypeclass defines the valid MAC address origins for a virtual Ethernet adapter.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- MacAddressTypeinstance.
 - ASSIGNED = MacAddressType(string='ASSIGNED')
- MAC address is assigned by vCenter Server. 
 - GENERATED = MacAddressType(string='GENERATED')
- MAC address is generated automatically. 
 - MANUAL = MacAddressType(string='MANUAL')
- MAC address is assigned statically. 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.Ethernet'
- Resource type for the virtual Ethernet adapter. 
 - class Summary(nic=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.Summaryclass contains commonly used information about a virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- nic ( - str) – Identifier of the virtual Ethernet adapter. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
 
 - class UpdateSpec(upt_compatibility_enabled=None, mac_type=None, mac_address=None, wake_on_lan_enabled=None, backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Ethernet.UpdateSpecclass describes the updates to be made to the configuration of a virtual Ethernet adapter.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- upt_compatibility_enabled ( - boolor- None) –- Flag indicating whether Universal Pass-Through (UPT) compatibility should be enabled on this virtual Ethernet adapter. - This attribute may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If None, the value is unchanged. Must be None if the emulation type of the virtual Ethernet adapter is not - Ethernet.EmulationType.VMXNET3.
- mac_type ( - Ethernet.MacAddressTypeor- None) –- MAC address type. - This attribute may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If None, the value is unchanged. 
- mac_address ( - stror- None) –- MAC address. - This attribute may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If None, the value is unchanged. Must be specified if - Ethernet.UpdateSpec.mac_typeis- Ethernet.MacAddressType.MANUAL. Must be None if the MAC address type is not- Ethernet.MacAddressType.MANUAL.
- wake_on_lan_enabled ( - boolor- None) –- Flag indicating whether wake-on-LAN shoud be enabled on this virtual Ethernet adapter. - This attribute may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If None, the value is unchanged. 
- backing ( - Ethernet.BackingSpecor- None) –- Physical resource backing for the virtual Ethernet adapter. - This attribute may be modified at any time, and changes will be applied the next time the virtual machine is powered on. If None, the value is unchanged. 
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
 - connect(vm, nic)
- Connects a virtual Ethernet adapter of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. - For a powered-off virtual machine, the - Ethernet.update()method may be used to configure the virtual Ethernet adapter to start in the connected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- nic ( - str) – Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual Ethernet adapter is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual Ethernet adapter is already connected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - create(vm, spec)
- Adds a virtual Ethernet adapter to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Ethernet.CreateSpec) – Specification for the new virtual Ethernet adapter.
 
- Return type
- str
- Returns
- Virtual Ethernet adapter identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.Ethernet.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reported that the Ethernet adapter was created but was unable to confirm the creation because the identifier of the new adapter could not be determined.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or network backing is not found.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the virtual machine already has the maximum number of supported Ethernet adapters.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the specified PCI address is out of bounds, HOST_DEVICE is specified as the type, or a backing cannot be found in the case that backing is left None.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the guest operating system of the virtual machine is not supported and spec includes None attributes that default to guest-specific values.
 
 - delete(vm, nic)
- Removes a virtual Ethernet adapter from the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- nic ( - str) – Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual Ethernet adapter is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - disconnect(vm, nic)
- Disconnects a virtual Ethernet adapter of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the Ethernet adapter is not connected to its backing resource. - For a powered-off virtual machine, the - Ethernet.update()method may be used to configure the virtual Ethernet adapter to start in the disconnected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- nic ( - str) – Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual Ethernet adapter is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual Ethernet adapter is already disconnected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, nic)
- Returns information about a virtual Ethernet adapter. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- nic ( - str) – Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
 
- Return type
- Returns
- Information about the specified virtual Ethernet adapter. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual Ethernet adapter is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual Ethernet adapters belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- List of commonly used information about virtual Ethernet adapters. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, nic, spec)
- Updates the configuration of a virtual Ethernet adapter. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- nic ( - str) – Virtual Ethernet adapter identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Ethernet.
- spec ( - Ethernet.UpdateSpec) – Specification for updating the virtual Ethernet adapter.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif HOST_DEVICE is specified as the type.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine, virtual Ethernet adapter, or backing network is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.Floppy(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Floppyclass provides methods for configuring the virtual floppy drives of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, image_file=None, host_device=None, auto_detect=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.BackingInfoclass contains information about the physical resource backing a virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Floppy.BackingType) – Backing type for the virtual floppy drive.
- image_file ( - str) – Path of the image file backing the virtual floppy drive. This attribute is optional and it is only relevant when the value of- typeis- Floppy.BackingType.IMAGE_FILE.
- host_device ( - stror- None) – Name of the host device backing the virtual floppy drive. This attribute will be None if- autoDetectis true and the virtual floppy drive is not connected or no suitable device is available on the host.
- auto_detect ( - bool) – Flag indicating whether the virtual floppy drive is configured to automatically detect a suitable host device. This attribute is optional and it is only relevant when the value of- typeis- Floppy.BackingType.HOST_DEVICE.
 
 
 - class BackingSpec(type=None, image_file=None, host_device=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.BackingSpecclass provides a specification of the physical resource backing a virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Floppy.BackingType) – Backing type for the virtual floppy drive.
- image_file ( - str) – Path of the image file that should be used as the virtual floppy drive backing. This attribute is optional and it is only relevant when the value of- typeis- Floppy.BackingType.IMAGE_FILE.
- host_device ( - stror- None) – Name of the device that should be used as the virtual floppy drive backing. If None, the virtual floppy drive will be configured to automatically detect a suitable host device.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Floppy.BackingTypeclass defines the valid backing types for a virtual floppy drive.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - CLIENT_DEVICE = BackingType(string='CLIENT_DEVICE')
- Virtual floppy drive is backed by a device on the client that is connected to the virtual machine console. 
 - HOST_DEVICE = BackingType(string='HOST_DEVICE')
- Virtual floppy drive is backed by a device on the host where the virtual machine is running. 
 - IMAGE_FILE = BackingType(string='IMAGE_FILE')
- Virtual floppy drive is backed by an image file. 
 
 - class CreateSpec(backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.CreateSpecclass provides a specification for the configuration of a newly-created virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Floppy.BackingSpecor- None) – Physical resource backing for the virtual floppy drive. If None, defaults to automatic detection of a suitable host device.
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
 - class Info(label=None, backing=None, state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.Infoclass contains information about a virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- label ( - str) – Device label.
- backing ( - Floppy.BackingInfo) – Physical resource backing for the virtual floppy drive.
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.Floppy'
- Resource type for the virtual floppy drive device. 
 - class Summary(floppy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.Summaryclass contains commonly used information about a virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- floppy ( - str) – Identifier of the virtual floppy drive. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
 
 - class UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Floppy.UpdateSpecclass describes the updates to be made to the configuration of a virtual floppy drive.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Floppy.BackingSpecor- None) –- Physical resource backing for the virtual floppy drive. - This attribute may only be modified if the virtual machine is not powered on or the virtual floppy drive is not connected. If None, the value is unchanged. 
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
 - connect(vm, floppy)
- Connects a virtual floppy drive of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. - For a powered-off virtual machine, the - Floppy.update()method may be used to configure the virtual floppy drive to start in the connected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- floppy ( - str) – Virtual floppy drive identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual floppy drive is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual floppy drive is already connected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - create(vm, spec)
- Adds a virtual floppy drive to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Floppy.CreateSpec) – Specification for the new virtual floppy drive.
 
- Return type
- str
- Returns
- Virtual floppy drive identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.Floppy.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reported that the floppy device was created but was unable to confirm the creation because the identifier of the new device could not be determined.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the virtual machine already has the maximum number of supported floppy drives.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - delete(vm, floppy)
- Removes a virtual floppy drive from the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- floppy ( - str) – Virtual floppy drive identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual floppy drive is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - disconnect(vm, floppy)
- Disconnects a virtual floppy drive of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the floppy drive is not connected to its backing resource. - For a powered-off virtual machine, the - Floppy.update()method may be used to configure the virtual floppy floppy to start in the disconnected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- floppy ( - str) – Virtual floppy drive identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual floppy drive is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual floppy drive is already disconnected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, floppy)
- Returns information about a virtual floppy drive. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- floppy ( - str) – Virtual floppy drive identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
 
- Return type
- Returns
- Information about the specified virtual floppy drive. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual floppy drive is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual floppy drives belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- List of commonly used information about virtual floppy drives. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, floppy, spec)
- Updates the configuration of a virtual floppy drive. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- floppy ( - str) – Virtual floppy drive identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Floppy.
- spec ( - Floppy.UpdateSpec) – Specification for updating the virtual floppy drive.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual floppy drive is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif one or more of the attributes specified in the- specparameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual floppy drive.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.IdeAddressInfo(primary=None, master=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - IdeAddressInfoclass contains information about the address of a virtual device that is attached to a virtual IDE adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- primary ( - bool) – Flag specifying whether the device is attached to the primary or secondary IDE adapter of the virtual machine.
- master ( - bool) – Flag specifying whether the device is the master or slave device on the IDE adapter.
 
 
- class com.vmware.vcenter.vm.hardware_client.IdeAddressSpec(primary=None, master=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - IdeAddressSpecclass contains information for specifying the address of a virtual device that is attached to a virtual IDE adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- primary ( - boolor- None) – Flag specifying whether the device should be attached to the primary or secondary IDE adapter of the virtual machine. If None, the server will choose a adapter with an available connection. If no IDE connections are available, the request will be rejected.
- master ( - boolor- None) – Flag specifying whether the device should be the master or slave device on the IDE adapter. If None, the server will choose an available connection type. If no IDE connections are available, the request will be rejected.
 
 
- class com.vmware.vcenter.vm.hardware_client.Memory(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Memoryclass provides methods for configuring the memory settings of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(size_mib=None, hot_add_enabled=None, hot_add_increment_size_mib=None, hot_add_limit_mib=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Memory.Infoclass contains memory-related information about a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- size_mib ( - long) – Memory size in mebibytes.
- hot_add_enabled ( - bool) –- Flag indicating whether adding memory while the virtual machine is running is enabled. - Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running. 
- hot_add_increment_size_mib ( - longor- None) –- The granularity, in mebibytes, at which memory can be added to a running virtual machine. - When adding memory to a running virtual machine, the amount of memory added must be at least - Memory.Info.hot_add_increment_size_miband the total memory size of the virtual machine must be a multiple of {\@link>hotAddIncrementSize}. Only set when- Memory.Info.hot_add_enabledis true and the virtual machine is running.
- hot_add_limit_mib ( - longor- None) – The maximum amount of memory, in mebibytes, that can be added to a running virtual machine. Only set when- Memory.Info.hot_add_enabledis true and the virtual machine is running.
 
 
 - class UpdateSpec(size_mib=None, hot_add_enabled=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Memory.UpdateSpecclass describes the updates to be made to the memory-related settings of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- size_mib ( - longor- None) –- New memory size in mebibytes. - The supported range of memory sizes is constrained by the configured guest operating system and virtual hardware version of the virtual machine. - If the virtual machine is running, this value may only be changed if - Memory.Info.hot_add_enabledis true, and the new memory size must satisfy the constraints specified by- Memory.Info.hot_add_increment_size_miband- Memory.Info.hot_add_limit_mib. If None, the value is unchanged.
- hot_add_enabled ( - boolor- None) –- Flag indicating whether adding memory while the virtual machine is running should be enabled. - Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running. - This attribute may only be modified if the virtual machine is not powered on. If None, the value is unchanged. 
 
 
 - get(vm)
- Returns the memory-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- Memory-related settings of the virtual machine. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, spec)
- Updates the memory-related settings of a virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Memory.UpdateSpec) – Specification for updating the memory-related settings of the virtual machine.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif one of the provided settings is not permitted; for example, specifying a negative value for- sizeMiB.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif- hotAddEnabledis specified and the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif- sizeMiBis specified,- hotAddEnabledis false, and the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.NvmeAddressInfo(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - NvmeAddressInfoclass contains information about the address of a virtual device that is attached to a virtual NVMe adapter of a virtual machine. This class was added in vSphere API 7.0.0.1.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device is attached. This attribute was added in vSphere API 7.0.0.1.
- unit ( - long) – Unit number of the device. This attribute was added in vSphere API 7.0.0.1.
 
 
- class com.vmware.vcenter.vm.hardware_client.NvmeAddressSpec(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - NvmeAddressSpecclass contains information for specifying the address of a virtual device that is attached to a virtual NVMe adapter of a virtual machine. This class was added in vSphere API 7.0.0.1.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device should be attached. This attribute was added in vSphere API 7.0.0.1.
- unit ( - longor- None) – Unit number of the device. This attribute was added in vSphere API 7.0.0.1. If None, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.
 
 
- class com.vmware.vcenter.vm.hardware_client.Parallel(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Parallelclass provides methods for configuring the virtual parallel ports of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, file=None, host_device=None, auto_detect=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.BackingInfoclass contains information about the physical resource backing a virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Parallel.BackingType) – Backing type for the virtual parallel port.
- file ( - str) – Path of the file backing the virtual parallel port. This attribute is optional and it is only relevant when the value of- typeis- Parallel.BackingType.FILE.
- host_device ( - stror- None) – Name of the device backing the virtual parallel port. This attribute will be None if- autoDetectis true and the virtual parallel port is not connected or no suitable device is available on the host.
- auto_detect ( - bool) – Flag indicating whether the virtual parallel port is configured to automatically detect a suitable host device. This attribute is optional and it is only relevant when the value of- typeis- Parallel.BackingType.HOST_DEVICE.
 
 
 - class BackingSpec(type=None, file=None, host_device=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.BackingSpecclass provides a specification of the physical resource backing a virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Parallel.BackingType) – Backing type for the virtual parallel port.
- file ( - str) – Path of the file that should be used as the virtual parallel port backing. This attribute is optional and it is only relevant when the value of- typeis- Parallel.BackingType.FILE.
- host_device ( - stror- None) – Name of the device that should be used as the virtual parallel port backing. If None, the virtual parallel port will be configured to automatically detect a suitable host device.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Parallel.BackingTypeclass defines the valid backing types for a virtual parallel port.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - FILE = BackingType(string='FILE')
- Virtual parallel port is backed by a file. 
 - HOST_DEVICE = BackingType(string='HOST_DEVICE')
- Virtual parallel port is backed by a device on the host where the virtual machine is running. 
 
 - class CreateSpec(backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.CreateSpecclass provides a specification for the configuration of a newly-created virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Parallel.BackingSpecor- None) – Physical resource backing for the virtual parallel port. If None, defaults to automatic detection of a suitable host device.
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
 - class Info(label=None, backing=None, state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.Infoclass contains information about a virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- label ( - str) – Device label.
- backing ( - Parallel.BackingInfo) – Physical resource backing for the virtual parallel port.
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.ParallelPort'
- Resource type for the virtual parallel port. 
 - class Summary(port=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.Summaryclass contains commonly used information about a virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- port ( - str) – Identifier of the virtual parallel port. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
 
 - class UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Parallel.UpdateSpecclass describes the updates to be made to the configuration of a virtual parallel port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- backing ( - Parallel.BackingSpecor- None) –- Physical resource backing for the virtual parallel port. - This attribute may only be modified if the virtual machine is not powered on or the virtual parallel port is not connected. If None, the value is unchanged. 
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
 - connect(vm, port)
- Connects a virtual parallel port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. - For a powered-off virtual machine, the - Parallel.update()method may be used to configure the virtual parallel port to start in the connected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual parallel port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual parallel port is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual parallel port is already connected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - create(vm, spec)
- Adds a virtual parallel port to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Parallel.CreateSpec) – Specification for the new virtual parallel port.
 
- Return type
- str
- Returns
- Virtual parallel port identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.ParallelPort.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reported that the parallel port device was created but was unable to confirm the creation because the identifier of the new device could not be determined.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the virtual machine already has the maximum number of supported parallel ports.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - delete(vm, port)
- Removes a virtual parallel port from the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual parallel port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual parallel port is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - disconnect(vm, port)
- Disconnects a virtual parallel port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the parallel port is not connected to its backing. - For a powered-off virtual machine, the - Parallel.update()method may be used to configure the virtual parallel port to start in the disconnected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual parallel port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual parallel port is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual parallel port is already disconnected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, port)
- Returns information about a virtual parallel port. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual parallel port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
 
- Return type
- Returns
- Information about the specified virtual parallel port. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual parallel port is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual parallel ports belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- List of commonly used information about virtual parallel ports. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, port, spec)
- Updates the configuration of a virtual parallel port. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual parallel port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.ParallelPort.
- spec ( - Parallel.UpdateSpec) – Specification for updating the virtual parallel port.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual parallel port is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif one or more of the attributes specified in the- specparameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual parallel port.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.SataAddressInfo(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - SataAddressInfoclass contains information about the address of a virtual device that is attached to a virtual SATA adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device is attached.
- unit ( - long) – Unit number of the device.
 
 
- class com.vmware.vcenter.vm.hardware_client.SataAddressSpec(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - SataAddressSpecclass contains information for specifying the address of a virtual device that is attached to a virtual SATA adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device should be attached.
- unit ( - longor- None) – Unit number of the device. If None, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.
 
 
- class com.vmware.vcenter.vm.hardware_client.ScsiAddressInfo(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - ScsiAddressInfoclass contains information about the address of a virtual device that is attached to a virtual SCSI adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device is attached.
- unit ( - long) – Unit number of the device.
 
 
- class com.vmware.vcenter.vm.hardware_client.ScsiAddressSpec(bus=None, unit=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - ScsiAddressSpecclass contains information for specifying the address of a virtual device that is attached to a virtual SCSI adapter of a virtual machine.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- bus ( - long) – Bus number of the adapter to which the device should be attached.
- unit ( - longor- None) – Unit number of the device. If None, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.
 
 
- class com.vmware.vcenter.vm.hardware_client.Serial(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Serialclass provides methods for configuring the virtual serial ports of a virtual machine.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class BackingInfo(type=None, file=None, host_device=None, auto_detect=None, pipe=None, no_rx_loss=None, network_location=None, proxy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.BackingInfoclass contains information about the physical resource backing a virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Serial.BackingType) – Backing type for the virtual serial port.
- file ( - str) – Path of the file backing the virtual serial port. This attribute is optional and it is only relevant when the value of- typeis- Serial.BackingType.FILE.
- host_device ( - stror- None) – Name of the device backing the virtual serial port. This attribute will be None if- autoDetectis true and the virtual serial port is not connected or no suitable device is available on the host.
- auto_detect ( - bool) – Flag indicating whether the virtual serial port is configured to automatically detect a suitable host device. This attribute is optional and it is only relevant when the value of- typeis- Serial.BackingType.HOST_DEVICE.
- pipe ( - str) – Name of the pipe backing the virtual serial port. This attribute is optional and it is only relevant when the value of- typeis one of- Serial.BackingType.PIPE_SERVERor- Serial.BackingType.PIPE_CLIENT.
- no_rx_loss ( - bool) – Flag that enables optimized data transfer over the pipe. When the value is true, the host buffers data to prevent data overrun. This allows the virtual machine to read all of the data transferred over the pipe with no data loss. This attribute is optional and it is only relevant when the value of- typeis one of- Serial.BackingType.PIPE_SERVERor- Serial.BackingType.PIPE_CLIENT.
- network_location ( - str) –- URI specifying the location of the network service backing the virtual serial port. - If - Serial.BackingInfo.typeis- Serial.BackingType.NETWORK_SERVER, this attribute is the location used by clients to connect to this server. The hostname part of the URI should either be empty or should specify the address of the host on which the virtual machine is running.
- If - Serial.BackingInfo.typeis- Serial.BackingType.NETWORK_CLIENT, this attribute is the location used by the virtual machine to connect to the remote server.
 - This attribute is optional and it is only relevant when the value of - typeis one of- Serial.BackingType.NETWORK_SERVERor- Serial.BackingType.NETWORK_CLIENT.
- proxy ( - stror- None) – Proxy service that provides network access to the network backing. If set, the virtual machine initiates a connection with the proxy service and forwards the traffic to the proxy. If None, no proxy service is configured.
 
 
 - class BackingSpec(type=None, file=None, host_device=None, pipe=None, no_rx_loss=None, network_location=None, proxy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.BackingSpecclass provides a specification of the physical resource backing a virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Serial.BackingType) – Backing type for the virtual serial port.
- file ( - str) – Path of the file backing the virtual serial port. This attribute is optional and it is only relevant when the value of- typeis- Serial.BackingType.FILE.
- host_device ( - stror- None) – Name of the device backing the virtual serial port. If None, the virtual serial port will be configured to automatically detect a suitable host device.
- pipe ( - str) – Name of the pipe backing the virtual serial port. This attribute is optional and it is only relevant when the value of- typeis one of- Serial.BackingType.PIPE_SERVERor- Serial.BackingType.PIPE_CLIENT.
- no_rx_loss ( - boolor- None) – Flag that enables optimized data transfer over the pipe. When the value is true, the host buffers data to prevent data overrun. This allows the virtual machine to read all of the data transferred over the pipe with no data loss. If None, defaults to false.
- network_location ( - str) –- URI specifying the location of the network service backing the virtual serial port. - If - Serial.BackingSpec.typeis- Serial.BackingType.NETWORK_SERVER, this attribute is the location used by clients to connect to this server. The hostname part of the URI should either be empty or should specify the address of the host on which the virtual machine is running.
- If - Serial.BackingSpec.typeis- Serial.BackingType.NETWORK_CLIENT, this attribute is the location used by the virtual machine to connect to the remote server.
 - This attribute is optional and it is only relevant when the value of - typeis one of- Serial.BackingType.NETWORK_SERVERor- Serial.BackingType.NETWORK_CLIENT.
- proxy ( - stror- None) – Proxy service that provides network access to the network backing. If set, the virtual machine initiates a connection with the proxy service and forwards the traffic to the proxy. If None, no proxy service should be used.
 
 
 - class BackingType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Serial.BackingTypeclass defines the valid backing types for a virtual serial port.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- BackingTypeinstance.
 - FILE = BackingType(string='FILE')
- Virtual serial port is backed by a file. 
 - HOST_DEVICE = BackingType(string='HOST_DEVICE')
- Virtual serial port is backed by a device on the host where the virtual machine is running. 
 - NETWORK_CLIENT = BackingType(string='NETWORK_CLIENT')
- Virtual serial port is backed by a network client. This backing may be used to create a network-accessible serial port on the virtual machine, initiating a connection to a remote system. 
 - NETWORK_SERVER = BackingType(string='NETWORK_SERVER')
- Virtual serial port is backed by a network server. This backing may be used to create a network-accessible serial port on the virtual machine, accepting a connection from a remote system. 
 - PIPE_CLIENT = BackingType(string='PIPE_CLIENT')
- Virtual serial port is backed by a named pipe client. The virtual machine will connect to the named pipe provided by a host application or another virtual machine on the same host. This is useful for capturing debugging information sent through the virtual serial port. 
 - PIPE_SERVER = BackingType(string='PIPE_SERVER')
- Virtual serial port is backed by a named pipe server. The virtual machine will accept a connection from a host application or another virtual machine on the same host. This is useful for capturing debugging information sent through the virtual serial port. 
 
 - class CreateSpec(yield_on_poll=None, backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.CreateSpecclass provides a specification for the configuration of a newly-created virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- yield_on_poll ( - boolor- None) – CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host. If None, defaults to false.
- backing ( - Serial.BackingSpecor- None) – Physical resource backing for the virtual serial port. If None, defaults to automatic detection of a suitable host device.
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. Defaults to false if None.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. Defaults to false if None.
 
 
 - class Info(label=None, yield_on_poll=None, backing=None, state=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.Infoclass contains information about a virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- label ( - str) – Device label.
- yield_on_poll ( - bool) – CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host.
- backing ( - Serial.BackingInfo) – Physical resource backing for the virtual serial port.
- state ( - ConnectionState) – Connection status of the virtual device.
- start_connected ( - bool) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.
- allow_guest_control ( - bool) – Flag indicating whether the guest can connect and disconnect the device.
 
 
 - RESOURCE_TYPE = 'com.vmware.vcenter.vm.hardware.SerialPort'
- Resource type for the virtual serial port device. 
 - class Summary(port=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.Summaryclass contains commonly used information about a virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- port ( - str) – Identifier of the virtual serial port. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
 
 - class UpdateSpec(yield_on_poll=None, backing=None, start_connected=None, allow_guest_control=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Serial.UpdateSpecclass describes the updates to be made to the configuration of a virtual serial port.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- yield_on_poll ( - boolor- None) –- CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host. - This attribute may be modified at any time, and changes applied to a connected virtual serial port take effect immediately. If None, the value is unchanged. 
- backing ( - Serial.BackingSpecor- None) –- Physical resource backing for the virtual serial port. - This attribute may only be modified if the virtual machine is not powered on or the virtual serial port is not connected. If None, the value is unchanged. 
- start_connected ( - boolor- None) – Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on. If None, the value is unchanged.
- allow_guest_control ( - boolor- None) – Flag indicating whether the guest can connect and disconnect the device. If None, the value is unchanged.
 
 
 - connect(vm, port)
- Connects a virtual serial port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. - For a powered-off virtual machine, the - Serial.update()method may be used to configure the virtual serial port to start in the connected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual serial port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual serial port is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual serial port is already connected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - create(vm, spec)
- Adds a virtual serial port to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Serial.CreateSpec) – Specification for the new virtual serial port.
 
- Return type
- str
- Returns
- Virtual serial port identifier. The return value will be an identifier for the resource type: - com.vmware.vcenter.vm.hardware.SerialPort.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reported that the serial port device was created but was unable to confirm the creation because the identifier of the new device could not be determined.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.UnableToAllocateResourceif the virtual machine already has the maximum number of supported serial ports.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - delete(vm, port)
- Removes a virtual serial port from the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual serial port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual serial port is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered off.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - disconnect(vm, port)
- Disconnects a virtual serial port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the serial port is not connected to its backing. - For a powered-off virtual machine, the - Serial.update()method may be used to configure the virtual serial port to start in the disconnected state when the virtual machine is powered on.- Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual serial port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual serial port is not found.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the virtual serial port is already disconnected.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - get(vm, port)
- Returns information about a virtual serial port. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual serial port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
 
- Return type
- Returns
- Information about the specified virtual serial port. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual serial port is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - list(vm)
- Returns commonly used information about the virtual serial ports belonging to the virtual machine. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- List of commonly used information about virtual serial ports. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 - update(vm, port, spec)
- Updates the configuration of a virtual serial port. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- port ( - str) – Virtual serial port identifier. The parameter must be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.SerialPort.
- spec ( - Serial.UpdateSpec) – Specification for updating the virtual serial port.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine or virtual serial port is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif one or more of the attributes specified in the- specparameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual serial port.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
 
 
- class com.vmware.vcenter.vm.hardware_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.vm.storage_client module
- class com.vmware.vcenter.vm.storage_client.Policy(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Policyclass provides methods to configure the storage policies associated with the virtual machine home and/or its virtual disks. This class was added in vSphere API 6.7.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class DiskPolicySpec(type=None, policy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Policy.DiskPolicySpecclass provides a specification for the storage policy to be associated with the virtual disks. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Policy.DiskPolicySpec.PolicyType) – Policy type to be used while performing update operation on the virtual disks. This attribute was added in vSphere API 6.7.
- policy ( - str) – Storage Policy identification. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. This attribute is optional and it is only relevant when the value of- typeis- Policy.DiskPolicySpec.PolicyType.USE_SPECIFIED_POLICY.
 
 - class PolicyType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Policy.DiskPolicySpecclass defines the choices for how to specify the policy to be associated with a virtual disk. This enumeration was added in vSphere API 6.7.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- PolicyTypeinstance.
 - USE_DEFAULT_POLICY = PolicyType(string='USE_DEFAULT_POLICY')
- Use the default storage policy of the datastore. This class attribute was added in vSphere API 6.7. 
 - USE_SPECIFIED_POLICY = PolicyType(string='USE_SPECIFIED_POLICY')
- Use the specified policy (see - Policy.DiskPolicySpec.policy). This class attribute was added in vSphere API 6.7.
 
 
 - class Info(vm_home=None, disks=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Policy.Infoclass contains information about the storage policies associated with virtual machine’s home directory and virtual hard disks. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- vm_home ( - stror- None) – Storage Policy associated with virtual machine home. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. IfNone, the virtual machine’s home directory doesn’t have any storage policy.
- disks ( - dictof- strand- str) – Storage policies associated with virtual disks. The values in this- dictare storage policy identifiers. They will be identifiers for the resource type:com.vmware.vcenter.StoragePolicy If the- dictis empty, the virtual machine does not have any disks or its disks are not associated with a storage policy. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the key in the attribute- dictmust be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the key in the attribute- dictwill be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk.
 
 
 - class UpdateSpec(vm_home=None, disks=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Policy.UpdateSpecclass describes the updates to be made to the storage policies associated with the virtual machine home and/or its virtual disks. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- vm_home ( - Policy.VmHomePolicySpecor- None) – Storage policy to be used when reconfiguring the virtual machine home. This attribute was added in vSphere API 6.7. if None the current storage policy is retained.
- disks (( - dictof- strand- Policy.DiskPolicySpec) or- None) – Storage policy or policies to be used when reconfiguring virtual machine diks. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the key in the attribute- dictmust be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the key in the attribute- dictwill be an identifier for the resource type:- com.vmware.vcenter.vm.hardware.Disk. if None the current storage policy is retained.
 
 
 - class VmHomePolicySpec(type=None, policy=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Policy.VmHomePolicySpecclass provides a specification for the storage policy to be associated with the virtual machine home’s directory. This class was added in vSphere API 6.7.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- type ( - Policy.VmHomePolicySpec.PolicyType) – Policy type to be used while performing update operation on the virtual machine home’s directory. This attribute was added in vSphere API 6.7.
- policy ( - str) – Storage Policy identification. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- com.vmware.vcenter.StoragePolicy. This attribute is optional and it is only relevant when the value of- typeis- Policy.VmHomePolicySpec.PolicyType.USE_SPECIFIED_POLICY.
 
 - class PolicyType(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Policy.VmHomePolicySpec.PolicyTypeclass defines the choices for how to specify the policy to be associated with the virtual machine home’s directory. This enumeration was added in vSphere API 6.7.- Note - This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page. - Parameters
- string ( - str) – String value for the- PolicyTypeinstance.
 - USE_DEFAULT_POLICY = PolicyType(string='USE_DEFAULT_POLICY')
- Use the default storage policy of the datastore. This class attribute was added in vSphere API 6.7. 
 - USE_SPECIFIED_POLICY = PolicyType(string='USE_SPECIFIED_POLICY')
- Use the specified policy (see - Policy.VmHomePolicySpec.policy). This class attribute was added in vSphere API 6.7.
 
 
 - get(vm)
- Returns Information about Storage Policy associated with a virtual machine’s home directory and/or its virtual hard disks. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Virtual machine identifier The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- Overview of Storage Policy associated with a virtual machine’s home directory and/or its associated virtual hard disks. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine’s configuration state cannot be accessed.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user does not have the required privileges.
 
 - update(vm, spec)
- Updates the storage policy configuration of a virtual machine and/or its associated virtual hard disks. This method was added in vSphere API 6.7. - Parameters
- vm ( - str) – Virtual machine identifier. The parameter must be an identifier for the resource type:- VirtualMachine.
- spec ( - Policy.UpdateSpec) – Storage Policy Specification for updating the virtual machine and virtual disks.
 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user is not authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required priveleges.
- Raise
- com.vmware.vapi.std.errors_client.InvalidArgumentif the storage policy specified is invalid.
- Raise
- com.vmware.vapi.std.errors_client.ResourceBusyif the virtual machine or disk is busy performing another operation.
- Raise
- com.vmware.vapi.std.errors_client.ResourceInaccessibleif the virtual machine or disk’s configuration state cannot be accessed.
 
 
- class com.vmware.vcenter.vm.storage_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.vm.tools_client module
The com.vmware.vcenter.vm_client module provides classes for managing
VMware Tools.
- class com.vmware.vcenter.vm.tools_client.Installer(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Installer(\@term service} provides methods to install VMware Tools in the guest operating system. This class was added in vSphere API 7.0.0.0.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - class Info(is_connected=None)
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Installer.Infoclass contains information about the VMWare Tools installer. This class was added in vSphere API 7.0.0.0.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- is_connected ( - bool) – Flag indicating whether the VMware Tools installer is mounted as a CD-ROM. This attribute was added in vSphere API 7.0.0.0.
 
 - connect(vm)
- Connects the VMware Tools CD installer as a CD-ROM for the guest operating system. On Windows guest operating systems with autorun, this should cause the installer to initiate the Tools installation which will need user input to complete. On other (non-Windows) guest operating systems this will make the Tools installation available, and a a user will need to do guest-specific actions. On Linux, this includes opening an archive and running the installer. To monitor the status of the Tools install, clients should check the - versionStatusand- runStatefrom- com.vmware.vcenter.vm_client.Tools.get(). This method was added in vSphere API 7.0.0.0.- Parameters
- vm ( - str) – Virtual machine ID The parameter must be an identifier for the resource type:- VirtualMachine.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.AlreadyInDesiredStateif the VMware Tools CD is already connected.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the Tools installation fails in the guest operating system.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
 
 - disconnect(vm)
- Disconnect the VMware Tools installer CD image. This method was added in vSphere API 7.0.0.0. - Parameters
- vm ( - str) – Virtual machine ID The parameter must be an identifier for the resource type:- VirtualMachine.
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the virtual machine is not powered on.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
 
 - get(vm)
- Get information about the VMware Tools installer. This method was added in vSphere API 7.0.0.0. - Parameters
- vm ( - str) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:- VirtualMachine.
- Return type
- Returns
- information about the VMware Tools installer. 
- Raise
- com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the virtual machine is not found.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.
 
 
- class com.vmware.vcenter.vm.tools_client.StubFactory(stub_config)
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance