Virtual Machine Get Resource Config

Virtual Machine Get Resource Config

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.

To retrieve the configuration, you typically use childConfiguration.

To change the configuration, use UpdateChildResourceConfiguration.

Request
URI
GET
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachine/{moId}/resourceConfig
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the property attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualMachine/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns ResourceConfigSpec of type(s) application/json
This response body class contains all of the following: DataObject
{
    "_typeName": "string",
    "entity": {
        "type": "string",
        "value": "string"
    },
    "changeVersion": "string",
    "lastModified": "string",
    "cpuAllocation": {
        "reservation": 0,
        "expandableReservation": false,
        "limit": 0,
        "shares": {
            "shares": 0,
            "level": "string"
        },
        "overheadLimit": 0
    },
    "memoryAllocation": {
        "reservation": 0,
        "expandableReservation": false,
        "limit": 0,
        "shares": {
            "shares": 0,
            "level": "string"
        },
        "overheadLimit": 0
    },
    "scaleDescendantsShares": "string"
}
entity
Optional

Reference to an instance of the ManagedEntity managed object.

string
changeVersion
Optional

The changeVersion is a unique identifier for a given version of the configuration.

Each change to the configuration will update this value. This is typically implemented as an ever increasing count or a time-stamp. However, a client should always treat this as an opaque string.

If specified when updating the resource config., the changes will only be applied if the current changeVersion matches the specified changeVersion. This field can be used to guard against updates that has happened between the configInfo was read and until it is applied.

string As date-time As date-time
lastModified
Optional

Timestamp when the resources were last modified.

This is ignored when the object is used to update a configuration.

cpuAllocation
Required

The ResourceAllocationInfo data object specifies the reserved resource requirement as well as the limit (maximum allowed usage) for a given kind of resource.

This is specified for both memory allocation (specified in MB) and CPU allocation (specified in MHz).

For a ResourcePool, the ResourceAllocationInfo object describes both the guaranteed amount of the resource (reservation) and whether or not it is expandable (expandableReservation). If expandableReservation is true, then the resource pool can grow its reservation dynamically by borrowing unreserved resources from its parent resource pool. For the methods CreateResourcePool, CreateVApp and ImportVApp, you must provide values for all properties except overheadLimit; they are not optional. (Currently, overheadLimit is for vCenter Server use only.)

If the limit is configured, it must be greater than or equal to the reservation.

memoryAllocation
Required

The ResourceAllocationInfo data object specifies the reserved resource requirement as well as the limit (maximum allowed usage) for a given kind of resource.

This is specified for both memory allocation (specified in MB) and CPU allocation (specified in MHz).

For a ResourcePool, the ResourceAllocationInfo object describes both the guaranteed amount of the resource (reservation) and whether or not it is expandable (expandableReservation). If expandableReservation is true, then the resource pool can grow its reservation dynamically by borrowing unreserved resources from its parent resource pool. For the methods CreateResourcePool, CreateVApp and ImportVApp, you must provide values for all properties except overheadLimit; they are not optional. (Currently, overheadLimit is for vCenter Server use only.)

If the limit is configured, it must be greater than or equal to the reservation.

string
scaleDescendantsShares
Optional

Specifies the scaling behavior of the shares of all descendant resource pools under a given resource pool.

See ResourceConfigSpecScaleSharesBehaviorEnum for possible values. If any scaling behavior other than disabled is specified, the system will scale the CPU and memory shares allocated to each descendant resource pool with the total shares of all powered on virtual machines under each respective pool. The system will also use the SharesInfo set on each descendant resource pool as a multiplier for the scale. If a resource pool's shares are already scalable through the ResourceConfigSpec.scaleDescendantsShares setting on an ancestor resource pool, the system will not allow ResourceConfigSpec.scaleDescendantsShares to be set on the resource pool. The ResourcePoolRuntimeInfo.sharesScalable property indicates whether or not a resource pool's shares are scalable. This property does not apply to virtual machines.


Virtual Machine Operations
POST
Virtual Machine Acquire Mks Ticket
POST
Virtual Machine Acquire Ticket
POST
Virtual Machine Answer VM
POST
Virtual Machine Apply Evc Mode VM Task
POST
Virtual Machine Attach Disk Task
POST
Virtual Machine Check Customization Spec
POST
Virtual Machine Clone VM Task
POST
Virtual Machine Consolidate VM Disks Task
POST
Virtual Machine Create Screenshot Task
POST
Virtual Machine Create Secondary VM Task
POST
Virtual Machine Create Secondary VM Ex Task
POST
Virtual Machine Create Snapshot Task
POST
Virtual Machine Create Snapshot Ex Task
POST
Virtual Machine Crypto Unlock Task
POST
Virtual Machine Customize VM Task
POST
Virtual Machine Defragment All Disks
POST
Virtual Machine Destroy Task
POST
Virtual Machine Detach Disk Task
POST
Virtual Machine Disable Secondary VM Task
POST
Virtual Machine Drop Connections
POST
Virtual Machine Enable Secondary VM Task
POST
Virtual Machine Estimate Storage For Consolidate Snapshots Task
POST
Virtual Machine Export Vm
POST
Virtual Machine Extract Ovf Environment
GET
Virtual Machine Get Alarm Actions Enabled
GET
Virtual Machine Get Available Field
GET
Virtual Machine Get Capability
GET
Virtual Machine Get Config
GET
Virtual Machine Get Config Issue
GET
Virtual Machine Get Config Status
GET
Virtual Machine Get Custom Value
GET
Virtual Machine Get Datastore
GET
Virtual Machine Get Declared Alarm State
GET
Virtual Machine Get Disabled Method
GET
Virtual Machine Get Effective Role
GET
Virtual Machine Get Environment Browser
GET
Virtual Machine Get Guest
GET
Virtual Machine Get Guest Heartbeat Status
GET
Virtual Machine Get Layout
GET
Virtual Machine Get Layout Ex
GET
Virtual Machine Get Name
GET
Virtual Machine Get Network
GET
Virtual Machine Get Overall Status
GET
Virtual Machine Get Parent
GET
Virtual Machine Get Parent V App
GET
Virtual Machine Get Permission
GET
Virtual Machine Get Recent Task
GET
Virtual Machine Get Resource Config
GET
Virtual Machine Get Resource Pool
GET
Virtual Machine Get Root Snapshot
GET
Virtual Machine Get Runtime
GET
Virtual Machine Get Snapshot
GET
Virtual Machine Get Storage
GET
Virtual Machine Get Summary
GET
Virtual Machine Get Tag
GET
Virtual Machine Get Triggered Alarm State
GET
Virtual Machine Get Value
POST
Virtual Machine Instant Clone Task
POST
Virtual Machine Make Primary VM Task
POST
Virtual Machine Mark As Template
POST
Virtual Machine Mark As Virtual Machine
POST
Virtual Machine Migrate VM Task
POST
Virtual Machine Mount Tools Installer
POST
Virtual Machine Power Off VM Task
POST
Virtual Machine Power On VM Task
POST
Virtual Machine Promote Disks Task
POST
Virtual Machine Put Usb Scan Codes
POST
Virtual Machine Query Changed Disk Areas
POST
Virtual Machine Query Connections
POST
Virtual Machine Query Fault Tolerance Compatibility
POST
Virtual Machine Query Fault Tolerance Compatibility Ex
POST
Virtual Machine Query Unowned Files
POST
Virtual Machine Reboot Guest
POST
Virtual Machine Reconfig VM Task
POST
Virtual Machine Refresh Storage Info
POST
Virtual Machine Reload
POST
Virtual Machine Reload Virtual Machine From Path Task
POST
Virtual Machine Relocate VM Task
POST
Virtual Machine Remove All Snapshots Task
POST
Virtual Machine Rename Task
POST
Virtual Machine Reset Guest Information
POST
Virtual Machine Reset VM Task
POST
Virtual Machine Revert To Current Snapshot Task
POST
Virtual Machine Send NMI
POST
Virtual Machine Set Custom Value
POST
Virtual Machine Set Display Topology
POST
Virtual Machine Set Screen Resolution
POST
Virtual Machine Shutdown Guest
POST
Virtual Machine Standby Guest
POST
Virtual Machine Start Recording Task
POST
Virtual Machine Start Replaying Task
POST
Virtual Machine Stop Recording Task
POST
Virtual Machine Stop Replaying Task
POST
Virtual Machine Suspend VM Task
POST
Virtual Machine Terminate Fault Tolerant VM Task
POST
Virtual Machine Terminate VM
POST
Virtual Machine Turn Off Fault Tolerance For VM Task
POST
Virtual Machine Unmount Tools Installer
POST
Virtual Machine Unregister VM
POST
Virtual Machine Upgrade Tools Task
POST
Virtual Machine Upgrade VM Task