Previous Topic: dpmvc gethosthba Command--Get Host Bus AdaptersNext Topic: dpmvc getshares Command--Get VM Shares


dpmvc getresources Command--Get VM Resources

The dpmvc getresources command retrieves CPU or memory share limits or reservations.

This command has the following format:

dpmvc getresources 
[-sc sc_url] 
-vm_name vmname 
-datacenter_name datacentername 
-resource {all|cpulimit|cpureserv|memlimit|memresrv} 
[-vc_server vcserver] 
[-pre] 
[-post] 
[-ws_user wsuser] 
[-ws_password wspassword] 
[-prompt {yes|no}] 
[-locale iso639value]
-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-vm_name vmname

Specifies the VM.

-datacenter_name datacentername

Specifies the data center where the VM is located.

-resource {all|vm_cpulimit|vm_cpureserv|vm_memlimit|vm_memresrv}

Specifies whether a specific resource is retrieved or all resources. Options include the following:

all

Retrieves all CPU and memory share limits and reservations for the VM.

vm_cpulimit

Retrieves the limit for the number of shares of CPU for the VM.

vm_cpureserv

Retrieves the number of shares of CPU reserved for the VM.

vm_memlimit

Retrieves the limit for the number of shares of memory for the VM.

vm_memresrv

Retrieves the number of shares of memory reserved for the VM.

-vc_server vcservername

Specifies the vCenter Server to access when you have multiple vCenter Servers. Optional for single vCenter Server environments.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-ws_user wsuser

(Optional) Specifies the web service user name to connect to the VC Platform Management Module (PMM).

-ws_password wspassword

(Optional) Specifies the password for the web service user to connect to the VC Performance Management Module (PMM).

-prompt {yes|no}

(Optional) Specifies whether you are prompted for the web service user ID and password.

Default: Yes

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Get all Resources for a VM

This example retrieves all resources for usa-vm2.

dpmvc getresources -resource all -datacenter_name MyCity -vm_name usa-vm2

Example: Get the CPU Limit for a VM

This example retrieves the individual resource cpulimit for vm uss-vm3.

dpmvc getresources -resource cpulimit -datacenter_name MyCity 
-vm_name uss-vm3 -vc_server vc_server_1