com.vmware.vcenter.vm package¶
Subpackages¶
Submodules¶
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.Identity(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Identityclass provides methods for retrieving guest operating system identification information. This class was added in vSphere API 6.7-
class
Info(name=None, family=None, full_name=None, host_name=None, ip_address=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Identity.Infoclass contains information describing the guest operating system identification. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
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: Identity.InfoReturns: 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 values.
-
class
-
class
com.vmware.vcenter.vm.guest_client.LocalFilesystem(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
LocalFilesystemclass provides methods for retrieving information about the guest operating system local file systems. This class was added in vSphere API 6.7-
class
Info(capacity=None, free_space=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
LocalFilesystem.Infoclass contains information about a local file system configured in the guest operating system. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
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: dictofstrandLocalFilesystem.InfoReturns: 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.
-
class
-
class
com.vmware.vcenter.vm.guest_client.Power(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Powerclass provides methods for managing the guest operating system power state of a virtual machine. This class was added in vSphere API 6.7-
class
Info(state=None, operations_ready=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructInformation 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.
-
class
State(string)¶ Bases:
vmware.vapi.bindings.enum.EnumPossible 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.
-
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: Power.InfoReturns: 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.
-
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.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.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
-
class
com.vmware.vcenter.vm.guest_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
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.VapiInterfaceThe
Bootclass provides methods for configuring the settings used when booting a virtual machine.-
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.VapiStructThe
Boot.CreateSpecclass describes settings used when booting a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
-
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.VapiStructThe
Boot.Infoclass contains information about the virtual machine boot process.Tip
The arguments are used to initialize data attributes with the same names.
-
class
NetworkProtocol(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Boot.NetworkProtocolclass defines the valid network boot protocols supported when booting a virtual machine withBoot.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.
-
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.EnumThe
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.
-
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.VapiStructThe
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.
-
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: Boot.InfoReturns: 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 fordelay.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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.Cdrom(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Cdromclass provides methods for configuring the virtual CD-ROM devices of a virtual machine.-
class
BackingInfo(type=None, iso_file=None, host_device=None, auto_detect=None, device_access_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingSpec(type=None, iso_file=None, host_device=None, device_access_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
DeviceAccessType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.EnumThe
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.
-
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.VapiStructThe
Cdrom.Infoclass contains information about a virtual CD-ROM device.Tip
The arguments are used to initialize data attributes with the same names.
-
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.VapiStructThe
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.
-
class
UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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.- vm (
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofCdrom.SummaryReturns: 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 thespecparameter 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.ConnectionCreateSpec(start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.ConnectionInfo(state=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.ConnectionState(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.Cpu(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Cpuclass provides methods for configuring the CPU settings of a virtual machine.-
class
Info(count=None, cores_per_socket=None, hot_add_enabled=None, hot_remove_enabled=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Cpu.Infoclass contains CPU-related information about a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(count=None, cores_per_socket=None, hot_add_enabled=None, hot_remove_enabled=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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: Cpu.InfoReturns: 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 forcount.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateifhotAddEnabledorhotRemoveEnabledis specified and the virtual machine is not powered off.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateifcountis specified and is greater thancount,hotAddEnabledis false, and the virtual machine is not powered off.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateifcountis specified and is less thancount,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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.Disk(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
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. TheDisk.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. TheDisk.delete()method provides the ability to detach a VMDK file from the virtual machine. TheDisk.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.-
class
BackingInfo(type=None, vmdk_file=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingSpec(type=None, vmdk_file=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
VMDK_FILE= BackingType(string='VMDK_FILE')¶ Virtual disk is backed by a VMDK file.
-
-
class
CreateSpec(type=None, ide=None, scsi=None, sata=None, backing=None, new_vmdk=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
HostBusAdapterType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
IDE= HostBusAdapterType(string='IDE')¶ Disk is attached to an IDE adapter.
-
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, backing=None, capacity=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Disk.Infoclass contains information about a virtual disk.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'com.vmware.vcenter.vm.hardware.Disk'¶ Resource type for the virtual disk.
-
class
StoragePolicySpec(policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Disk.StoragePolicySpecclass contains information about the storage policy be associated with a VMDK file. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
Summary(disk=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Disk.Summaryclass contains commonly used information about a virtual disk.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(backing=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
VmdkCreateSpec(name=None, capacity=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofDisk.SummaryReturns: 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 thespecparameter 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.Ethernet(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Ethernetclass provides methods for configuring the virtual Ethernet adapters of a virtual machine.-
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.VapiStructThe
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.
-
class
BackingSpec(type=None, network=None, distributed_port=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
EmulationType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
Ethernet.Infoclass contains information about a virtual Ethernet adapter.Tip
The arguments are used to initialize data attributes with the same names.
-
class
MacAddressType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
Ethernet.Summaryclass contains commonly used information about a virtual Ethernet adapter.Tip
The arguments are used to initialize data attributes with the same names.
-
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.VapiStructThe
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.
-
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.- vm (
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofEthernet.SummaryReturns: 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.Floppy(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Floppyclass provides methods for configuring the virtual floppy drives of a virtual machine.-
class
BackingInfo(type=None, image_file=None, host_device=None, auto_detect=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingSpec(type=None, image_file=None, host_device=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
Info(label=None, backing=None, state=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Floppy.Infoclass contains information about a virtual floppy drive.Tip
The arguments are used to initialize data attributes with the same names.
-
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.VapiStructThe
Floppy.Summaryclass contains commonly used information about a virtual floppy drive.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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.- vm (
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofFloppy.SummaryReturns: 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 thespecparameter 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.IdeAddressInfo(primary=None, master=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.IdeAddressSpec(primary=None, master=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.Memory(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Memoryclass provides methods for configuring the memory settings of a virtual machine.-
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.VapiStructThe
Memory.Infoclass contains memory-related information about a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(size_mib=None, hot_add_enabled=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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: Memory.InfoReturns: 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 forsizeMiB.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateifhotAddEnabledis specified and the virtual machine is not powered off.Raise: com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateifsizeMiBis 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.Parallel(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Parallelclass provides methods for configuring the virtual parallel ports of a virtual machine.-
class
BackingInfo(type=None, file=None, host_device=None, auto_detect=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingSpec(type=None, file=None, host_device=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
Info(label=None, backing=None, state=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Parallel.Infoclass contains information about a virtual parallel port.Tip
The arguments are used to initialize data attributes with the same names.
-
RESOURCE_TYPE= 'com.vmware.vcenter.vm.hardware.ParallelPort'¶ Resource type for the virtual parallel port.
-
class
Summary(port=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Parallel.Summaryclass contains commonly used information about a virtual parallel port.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(backing=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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.- vm (
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofParallel.SummaryReturns: 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 thespecparameter 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.SataAddressInfo(bus=None, unit=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.SataAddressSpec(bus=None, unit=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.ScsiAddressInfo(bus=None, unit=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.ScsiAddressSpec(bus=None, unit=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
class
com.vmware.vcenter.vm.hardware_client.Serial(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Serialclass provides methods for configuring the virtual serial ports of a virtual machine.-
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.VapiStructThe
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.
-
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.VapiStructThe
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.
-
class
BackingType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.
-
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.VapiStructThe
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.
-
class
Info(label=None, yield_on_poll=None, backing=None, state=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Serial.Infoclass contains information about a virtual serial port.Tip
The arguments are used to initialize data attributes with the same names.
-
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.VapiStructThe
Serial.Summaryclass contains commonly used information about a virtual serial port.Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(yield_on_poll=None, backing=None, start_connected=None, allow_guest_control=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.
-
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.- vm (
-
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: strReturns: 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.- vm (
-
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.- vm (
-
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.- vm (
-
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.- vm (
-
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: listofSerial.SummaryReturns: 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 thespecparameter 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.hardware_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
com.vmware.vcenter.vm.storage_client module¶
-
class
com.vmware.vcenter.vm.storage_client.Policy(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
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-
class
DiskPolicySpec(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Policy.DiskPolicySpecclass provides a specification for the storage policy to be associated with the virtual disks. This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
PolicyType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.7Note
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.
-
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
-
class
Info(vm_home=None, disks=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
UpdateSpec(vm_home=None, disks=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
VmHomePolicySpec(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
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.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
PolicyType(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
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.7Note
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.
-
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
-
-
class
-
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: Policy.InfoReturns: 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.- vm (
-
class
-
class
com.vmware.vcenter.vm.storage_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase