VirtualMachine extends the ManagedEntity type because virtual machines are part of a virtual infrastructure inventory. The parent of a virtual machine must be a folder, and a virtual machine has no children.
Destroying a virtual machine disposes of all associated storage, including the virtual disks. To remove a virtual machine while retaining its virtual disk storage, a client must remove the virtual disks from the virtual machine before destroying it.
Name | Type | Description |
---|---|---|
alarmActionsEnabled | boolean | Whether alarm actions are enabled for this entity. True if enabled; false otherwise. |
availableField | VcCustomFieldDef[] | List of custom field definitions that are valid for the object's type. The fields are sorted by <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcCustomFieldDef.html#name">VcCustomFieldDef</a>. |
capability | VcVirtualMachineCapability | Information about the runtime capabilities of this virtual machine. |
config | VcVirtualMachineConfigInfo | Configuration of this virtual machine, including the name and UUID. <p> This property is set when a virtual machine is created or when the <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#reconfigure">VcVirtualMachine</a> method is called. <p> The virtual machine configuration is not guaranteed to be available. For example, the configuration information would be unavailable if the server is unable to access the virtual machine files on disk, and is often also unavailable during the initial phases of virtual machine creation. |
configIssue | VcEvent[] | Current configuration issues that have been detected for this entity. Typically, these issues have already been logged as events. The entity stores these events as long as they are still current. The <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcManagedEntity.html#configStatus">VcManagedEntity</a> property provides an overall status based on these events. |
configLocked | boolean | Indicates whether or not a virtual machine's config file is locked (encrypted). If the config file is locked, then the client must unlock it by invoking the <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#unlock">VcVirtualMachine</a> method with appropriate key before using the virtual machine. |
configStatus | VcManagedEntityStatus | The configStatus indicates whether or not the system has detected a configuration issue involving this entity. For example, it might have detected a duplicate IP address or MAC address, or a host in a cluster might be out of compliance. The meanings of the configStatus values are: <ul> <li>red: A problem has been detected involving the entity. <li>yellow: A problem is about to occur or a transient condition has occurred (For example, reconfigure fail-over policy). <li>green: No configuration issues have been detected. <li>gray: The configuration status of the entity is not being monitored. </ul> A green status indicates only that a problem has not been detected; it is not a guarantee that the entity is problem-free. <p> The <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcManagedEntity.html#configIssue">VcManagedEntity</a> property contains a list of the problems that have been detected. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
customValue | VcCustomFieldValue[] | Custom field values. |
datastore | VcDatastore[] | A collection of references to the subset of datastore objects in the datacenter that is used by this virtual machine. |
declaredAlarmState | VcAlarmState[] | A set of alarm states for alarms that apply to this managed entity. The set includes alarms defined on this entity and alarms inherited from the parent entity, or from any ancestors in the inventory hierarchy. <p> Alarms are inherited if they can be triggered by this entity or its descendants. This set does not include alarms that are defined on descendants of this entity. |
disabledMethod | String[] | List of operations that are disabled, given the current runtime state of the entity. For example, a power-on operation always fails if a virtual machine is already powered on. This list can be used by clients to enable or disable operations in a graphical user interface. <p> Note: This list is determined by the current runtime state of an entity, not by its permissions. <p> This list may include the following operations for a HostSystem: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcHostSystem</a> </ul> <p> This list may include the following operations for a VirtualMachine: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualMachine</a> </ul> <p> This list may include the following operations for a ResourcePool: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcResourcePool</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcFolder</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> </ul> This list may include the following operations for a VirtualApp: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcManagedEntity</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcHostSystem.html#enterMaintenanceMode">VcVirtualApp</a> </ul> <p> In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
effectiveRole | Number[] | Access rights the current session has to this entity. |
environmentBrowser | VcEnvironmentBrowser | The current virtual machine's environment browser object. This contains information on all the configurations that can be used on the virtual machine. This is identical to the environment browser on the <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcComputeResource.html">VcComputeResource</a> to which this virtual machine belongs. |
guest | VcGuestInfo | Information about VMware Tools and about the virtual machine from the perspective of VMware Tools. Information about the guest operating system is available in VirtualCenter. Guest operating system information reflects the last known state of the virtual machine. For powered on machines, this is current information. For powered off machines, this is the last recorded state before the virtual machine was powered off. |
guestHeartbeatStatus | VcManagedEntityStatus | The guest heartbeat. The heartbeat status is classified as: <ul> <li> gray - VMware Tools are not installed or not running.</li> <li> red - No heartbeat. Guest operating system may have stopped responding.</li> <li> yellow - Intermittent heartbeat. May be due to guest load.</li> <li> green - Guest operating system is responding normally.</li> </ul> The guest heartbeat is a statistics metric. Alarms can be configured on this metric to trigger emails or other actions. |
guestInstallManager | VcCustomizationGuestInstallManager | Tools for performing unattended installs of guest OSes. |
id | String | returns the id of this ManagedObject |
layout | VcVirtualMachineFileLayout | Detailed information about the files that comprise this virtual machine. <p> <br/><i>As of vSphere API 4.0, use <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#layoutEx">VcVirtualMachine</a> instead. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated.</i> |
layoutEx | VcVirtualMachineFileLayoutEx | Detailed information about the files that comprise this virtual machine. <p> Can be explicitly refreshed by the <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#refreshStorageInfo">VcVirtualMachine</a> operation. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
name | String | Name of this entity, unique relative to its parent. <p> Any / (slash), \ (backslash), character used in this name element will be escaped. Similarly, any % (percent) character used in this name element will be escaped, unless it is used to start an escape sequence. A slash is escaped as %2F or %2f. A backslash is escaped as %5C or %5c, and a percent is escaped as %25. |
network | VcNetwork[] | A collection of references to the subset of network objects in the datacenter that is used by this virtual machine. |
overallStatus | VcManagedEntityStatus | General health of this managed entity. The overall status of the managed entity is computed as the worst status among its alarms and the configuration issues detected on the entity. The status is reported as one of the following values: <ul> <li>red: The entity has alarms or configuration issues with a red status. <li>yellow: The entity does not have alarms or configuration issues with a red status, and has at least one with a yellow status. <li>green: The entity does not have alarms or configuration issues with a red or yellow status, and has at least one with a green status. <li>gray: All of the entity's alarms have a gray status and the configuration status of the entity is not being monitored. </ul> In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
parent | VcManagedEntity | Parent of this entity. <p> This value is null for the root object and for <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html">VcVirtualMachine</a> objects that are part of a <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html">VcVirtualApp</a>. |
parentVApp | VcManagedEntity | Reference to the parent vApp. |
permission | VcPermission[] | List of permissions defined for this entity. |
recentTask | VcTask[] | The set of recent tasks operating on this managed entity. This is a subset of <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcTaskManager.html#recentTask">VcTaskManager</a> belong to this entity. A task in this list could be in one of the four states: pending, running, success or error. <p> This property can be used to deduce intermediate power states for a virtual machine entity. For example, if the current powerState is "poweredOn" and there is a running task performing the "suspend" operation, then the virtual machine's intermediate state might be described as "suspending." <p> Most tasks (such as power operations) obtain exclusive access to the virtual machine, so it is unusual for this list to contain more than one running task. One exception, however, is the task of cloning a virtual machine. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
reference | VcManagedObjectReference | returns the ManagedObjectReference of this ManagedObject |
resourceConfig | VcResourceConfigSpec | The resource configuration for a virtual machine. The shares in this specification are evaluated relative to the resource pool to which it is assigned. This will return null if the product the virtual machine is registered on does not support resource configuration. <p> To retrieve the configuration, you typically use <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcResourcePool.html#childConfiguration">VcResourcePool</a>. <p> To change the configuration, use <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcResourcePool.html#childConfiguration">VcResourcePool</a>. |
resourcePool | VcResourcePool | The current resource pool that specifies resource allocation for this virtual machine. <p> This property is set when a virtual machine is created or associated with a different resource pool. <p> Returns null if the virtual machine is a template or the session has no access to the resource pool. |
rootSnapshot | VcVirtualMachineSnapshot[] | The roots of all snapshot trees for the virtual machine. |
runtime | VcVirtualMachineRuntimeInfo | Execution state and history for this virtual machine. <p> The contents of this property change when: <ul> <li>the virtual machine's power state changes.</li> <li>an execution message is pending.</li> <li>an event occurs.</li> </ul> |
sdkConnection | VcSdkConnection | returns the parent SdkConnection |
snapshot | VcVirtualMachineSnapshotInfo | Current snapshot and tree. The property is valid if snapshots have been created for this virtual machine. <p> The contents of this property change in response to the methods: <ul> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#createSnapshot">VcVirtualMachine</a></li> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#createSnapshot">VcVirtualMachine</a></li> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#createSnapshot">VcVirtualMachineSnapshot</a></li> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#createSnapshot">VcVirtualMachineSnapshot</a></li> <li><a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#createSnapshot">VcVirtualMachine</a></li> </ul> |
storage | VcVirtualMachineStorageInfo | Storage space used by the virtual machine, split by datastore. Can be explicitly refreshed by the <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcVirtualMachine.html#refreshStorageInfo">VcVirtualMachine</a> operation. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
summary | VcVirtualMachineSummary | Basic information about this virtual machine. This includes: <ul> <li>runtimeInfo</li> <li>guest</li> <li>basic configuration</li> <li>alarms</li> <li>performance information</li> </ul> |
tag | VcTag[] | The set of tags associated with this managed entity. Experimental. Subject to change. |
triggeredAlarmState | VcAlarmState[] | A set of alarm states for alarms triggered by this entity or by its descendants. <p> Triggered alarms are propagated up the inventory hierarchy so that a user can readily tell when a descendant has triggered an alarm. In releases after vSphere API 5.0, vSphere Servers might not generate property collector update notifications for this property. To obtain the latest value of the property, you can use PropertyCollector methods RetrievePropertiesEx or WaitForUpdatesEx. If you use the PropertyCollector.WaitForUpdatesEx method, specify an empty string for the version parameter. Any other version value will not produce any property values as no updates are generated. |
value | VcCustomFieldValue[] | List of custom field values. Each value uses a key to associate an instance of a <a target="_blank" href="https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcCustomFieldStringValue.html">VcCustomFieldStringValue</a> with a custom field definition. |
vimHost | VcSdkConnection | returns the parent SdkConnection (deprecated) |
vimType | String | returns the type of this ManagedObject |
Method | Returns |
---|---|
VcPlugin.getAllVirtualMachines(String[] additionalPropertyFilters, String query) | VcVirtualMachine[] |
VcPlugin.importOvf(String ovfUri, VcHostSystem hostSystem, VcFolder importFolder, String vmName, VcOvfNetworkMapping[] networks, VcDatastore datastore) | VcVirtualMachine |
VcPlugin.importOvf(String , VcHostSystem , VcFolder , String , VcOvfNetworkMapping[] , VcDatastore , VcKeyValue[] ) | VcVirtualMachine |
VcSdkConnection.getAllVirtualMachines(String[] additionalPropertyFilters, String query) | VcVirtualMachine[] |
VcSearchIndex.findByDatastorePath(VcDatacenter datacenter, String path) | VcVirtualMachine |