Maps a virtual disk or CDROM to a virtual machine disk slot.
create VmDiskMapping slot= [valuestorageDevice=] valuename= [valuedescription=] valueon Vm instance
Where is:
instance
{ id= | idname= }name
This command maps a virtual disk or CDROM to a virtual machine disk slot. To create an empty CDROM drive, do not provide the storageDevice option. To edit a virtual disk or eject a CDROM, remove it using the delete VmDiskMapping command, then use the create VmDiskMapping command again to remap it to a virtual machine with any changed settings.
The following table shows the available options for this command.
Option | Description |
|---|---|
|
The slot number for the disk in the virtual machine,
starting at |
| The name or ID of the disk; either a virtual disk, a virtual CDROM or a physical disk. If this option is not provided, an empty CDROM is created. |
| A name to identify the disk mapping. Tip To find this name after a virtual disk is mapped to a virtual machine, use the list VmDiskMapping command. You will need the name or ID of this to delete a disk mapping from a virtual machine with the delete VmDiskMapping command. |
| Optional description for the disk mapping object. |
{ |
The instance of the object using either the
|
Any create command only creates a single instance of an object, and therefore only accepts a single object instance as an attribute. Providing more than one object of the same attribute type as a parameter always results in the last attribute value taking precedence.
Example A.41 Mapping a virtual disk to a virtual machine
OVM> create VmDiskMapping slot=0 storageDevice=MyVMDisk name=BootDisk on Vm name=MyVM
Example A.42 Mapping an ISO file to a virtual machine
OVM> create VmDiskMapping slot=1 storageDevice=OracleLinux-R6-U2-Server-x86_64-dvd.iso \ name=CDROM on Vm name=MyVM
Example A.43 Mapping an empty CDROM drive
OVM> create VmDiskMapping slot=2 name="CDROM Drive" on Vm name=MyVM