The SetVMDisk command lets you assign a virtual drive or disk to a drive controller.
This command has the following format:
dpmhyperv SetVMDisk [-ws_user username] [-ws_password password] [-ws_encrypted_password] -hypervHost hostname -vm vm_name|-vmguid vm_ID -drive {HDD|DVD} -driveType {scsi|ide} [-path location] -id drive_ID_number [-lun logical_unit_num] [-pre] [-post] [-locale iso639value]
(Optional) Specifies the CA Server Automation user name.
(Optional) Specifies the CA Server Automation user password.
(Optional) Indicates whether the CA Server Automation password is encrypted.
Specifies the name of the Hyper-V host.
Specifies the VM name.
Specifies the unique GUID of the VM.
Specifies the type of drive that the image is assigned to. Options include the following:
Indicates that the drive type is hard drive.
Indicates that the drive type is CD/DVD drive.
Specifies the type of drive controller that the image is assigned to. Options include the following:
Indicates that the drive controller is SCSI.
Indicates that the drive controller is IDE. For CD/DVD images the controller type must IDE.
(Optional) Defines the location of the virtual disk or drive.
Specifies the ID number of the drive. Specify 0 for the IDE and 0,1, or 2 for the SCSI drive.
(Optional) Specifies the Logical Unit Number (LUN) number of the SCSI drive. For IDE controllers, the LUN must be 0 or 1 and for SCSI controllers, the LUN must be from 0 to 63. If no number is specified, the available channel is assigned automatically.
(Optional) Generates an event before the operation is complete.
(Optional) Generates an event after the operation is complete.
(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: Assign a Drive on a Drive Controller
This example assigns the virtual hard drive image file, "disk.vhd" to the first channel on the first SCSI controller:
dpmhv-setVMDisk -hypervHost hvserver -vm TestVM -type scsi -id 0 -lun 0 -drive HDD -path c:\VHDs\disk.vhd
Copyright © 2013 CA. All rights reserved. |
|