The dpmhv-expandVirtDisk command lets you increase the virtual disk size. To use the expanded virtual disk space, you must partition the virtual disk in the guest operating system running on a virtual machine.
This command has the following format:
dpmhv-expandVirtDisk -host hostname -path pathname -sizeGB size [-async] [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the path name of the virtual disk that you want to expand.
Specifies the size of the virtual disk in gigabytes.
(Optional) Specifies the option to execute the command asynchronously. By default, this command is executed synchronously.
Note: If this command completes the execution before executing this option, it returns a job ID that is used to view the operation status.
Returns a value for further processing.
Specifies not to direct the output to the screen.
The dpmhv-expandVirtDisk command returns an empty string when it is executed synchronously. If executed asynchronously, a string representing job ID is passed to dpmhv-getJobErrorInfo, dpmhv-getJobInfo, or dpmhv-getJobStatus. In synchronous mode, if an error occurs during execution, the command returns the error code and reports the error.
Example: Expand Virtual Disk
This example expands the size of the virtual disk to 4 GB.
dpmhv-expandVirtDisk -host hvserver -path C:\VMDisks\hdd.vhd -sizeGB 4
Copyright © 2013 CA. All rights reserved. |
|