The dpmhv-setVMProperties command lets you set the properties of the VM.
This command has the following format:
dpmhv-setVMProperties -host hostname -vm vmname|-vmid vmguid [-name name] [-mem mem] [-cpus cpus] [-cpuidlimit limit] [-cpureserve reserve] [-cpulimit limit] [-cpuweight weight] [-startAction {none,auto,always}] [-startDelay delay] [-stopAction {save,off,shutdown}] [-recoveryAction {none,restart,revert}] [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the name of the VM.
Specifies the unique ID of the VM.
Displays the name of the VM.
(Optional) Specifies the RAM memory in megabytes (MB) for the VM that you want to create.
Default: -1
(Optional) Specifies the number of CPU core that you want to assign to the VM.
(Optional) Specifies the limit of CPU ID functionality of VM. This option improves the compatibility with legacy operating systems such as Windows NT.
Default: -1
(Optional) Specifies the percentage of the CPU that you want to reserve for the VM. If this option is not specified, Hyper-V server assigns CPU cycles based on the overall system usage.
Default: -1
(Optional) Specifies the limit for the number of CPU resources used by a VM. This option improves the compatibility while moving VMs between physical hosts with different CPU capabilities.
Default: -1
(Optional) Specifies the relative weight of the virtual machine. This option controls resource allocation when more than one VM is running. Valid entry: integer, 1-10000.
Default: -1
(Optional) Specifies the action that you want to perform on the VM when the Hyper-V host starts up. Options include the following:
Performs no action.
Starts the VM automatically.
Note: Use this option if the VM was running before the Hyper-V host is shut down.
Starts the VM always.
(Optional) Specifies the delay in seconds to start the VM after the Hyper-V host is up and running.
Default: -1
(Optional) Specifies the action that you want to perform on the VM when the physical Hyper-V shuts down. Options include the following:
Suspends the VM.
Power offs the VM.
Shuts down the system.
(Optional) Specifies the delay in seconds to start the VM after the Hyper-V host is up and running.
Default: -1
(Optional) Specifies the action to perform on the VM after the Hyper-V host restarts from unexpected shutdown. Options include the following:
Performs no action.
Restart the VM.
Reverts to the last snapshot of the VM.
Returns a value for further processing.
Specifies not to direct the output to the screen.
Example: Change number of Core CPUs
This example changes the number of CPU cores assigned to the VM to two. To run the command successfully, turn off the VM.
dpmhv-setVMProperties -host hvserver -vm TestVM -cpus 2
Copyright © 2013 CA. All rights reserved. |
|