Previous Topic: dpmhyperv SetVMDisk Command--Assign a Drive or Disk to a Drive ControllerNext Topic: dpmhyperv SetVMVirtFloppy Command--Assign a Virtual Floppy Image to a VM Floppy Drive


dpmhyperv SetVMProperties Command--Set Properties of a VM

The dpmhyperv SetVMProperties command lets you change the properties of a VM.

This command has the following format:

dpmhyperv SetVMProperties 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] 
-hypervHost hostname 
-vm vm_name|-vguid vm_ID 
[-memory memory_size] 
[-cpuSocketCount total_CPU_socket_count] 
[-cpuidLimit CPU_ID_Limit] 
[-cpufeatlimit CPU_Feature_Limit] 
[-cpuReserve cpu_reserver] 
[-cpuReserve cpu_reserve] 
[-cpuLimit max_CPU_usage] 
[-cpuWeight cpu_wieight] 
[-startAction {none|auto|always}] 
[-startDelay start_delay_secs] 
[-stopAction {save|off|shutdown}] 
[-recoveryAction {none|restart|revert}] 
[-pre] 
[-post]
[-locale iso639value]
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-vm vm_name

Specifies the VM name.

-vmguid vm_ID

Specifies the unique GUID of the VM.

-memory memory_size

(Optional) Defines the size of the memory size of the VM in MB.

-cpuSocketCount total_CPU_socket_count

(Optional) Defines the number of CPU cores in the VM. The CPU cores cannot be more than the total number of the CPU cores available in the Hyper-V host.

-cpuidLimit CPU_ID_Limit

(Optional) Indicates whether the VM must lower the CPU identifier for better compatibility with legacy operating systems like Windows NT.

cpufeatlimit CPU_Feature_Limit

(Optional) Indicates whether the VM must limit the CPU features exposed to the operating system.

-cpuReserve cpu_reserve

(Optional) Specifies the amount of CPU resources that are reserved for use by the VM.

-cpuLimit max_CPU_usage

(Optional) Specifies the maximum amount of CPU resources that the VM can consume.

-cpuWeight cpu_weight

(Optional) Specifies the relative weight of the virtual machine from 1 and 10000.

Default: 100

-startAction {none|auto|always}

(Optional) Specifies the time interval to wait before performing the start-up action. Options include the following:

none

Performs no action.

auto

Starts the VM automatically if it was running before the Hyper-V host was shut down.

always

Starts the VM every time Hyper-V starts.

-startDelay start_delay_secs

(Optional) Specifies the delay in seconds to start the VM after the Hyper-V host is started.

-stopAction {save|off|shutdown}

(Optional) Specifies the action to perform on the VM before the Hyper-V host shuts down. Options include the following:

save

Suspends the VM.

off

Turns off the VM.

shutdown

Shuts down the VM.

-recoveryAction {none|restart|revert}

(Optional) Specifies the action to perform on the VM after the Hyper-V host restarts after an unexpected shutdown. Options include the following:

none

Performs no action.

restart

Restarts the VM.

revert

Returns to the last snapshot.

-pre

(Optional) Generates an event before the operation is complete.

-post

(Optional) Generates an event after the operation is complete.

-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: Set Properties of a VM

This example changes the number of assigned CPU cores to two.

dpmhyperv -setVMProperties -ws_user dcaadmin -ws_password #test# -hypervHost hserver -vm TestVM -cpus 2