Maps a virtual disk, physical disk, or CDROM to a virtual machine disk slot.
Syntax
create VmDiskMapping
slot=
{
value
physicalDisk=
|
value
virtualDisk=
|
value
virtualCd=
{
|
value
EMPTY_CDROM
}
}
name=
[
value
description=
]
value
on Vm
instance
Where
is:
instance
{
id=
|
value
name=
}value
Description
This command maps a virtual disk, physical disk, or CDROM to a
virtual machine disk slot. To create an empty CDROM drive, use the
virtualCd=EMPTY_CDROM
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.
Options
The following table shows the available options for this command.
Option | Description |
---|---|
|
The slot number for the disk in the virtual machine This
can be an integer between |
| The name or ID of the physical disk. |
| The name or ID of the virtual disk. |
|
The name or ID of the ISO file (virtual CDROM).
Alternatively, to create an empty CDROM, use the
|
| 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.
Examples
Example A.71 Mapping a virtual disk to a virtual machine
OVM> create VmDiskMapping slot=0 virtualDisk=MyVMDisk name="Boot Disk" on Vm name=MyVM
Example A.72 Mapping an ISO file (CDROM) to a virtual machine
OVM> create VmDiskMapping slot=1 virtualCd=OracleLinux-dvd.iso \ name="CDROM Drive" on Vm name=MyVM
Example A.73 Mapping an empty CDROM drive to a virtual machine
OVM> create VmDiskMapping slot=2 virtualCd=EMPTY_CDROM name="CDROM Drive" on Vm name=MyVM
Example A.74 Mapping a physical disk to a virtual machine
OVM> create VmDiskMapping slot=3 physicalDisk=MyPhysicalDisk name="D Drive" on Vm name=MyVM