mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
VMX: Add cdrom-raw dev type from VMWare Fusion
According to VMWare's documentation 'cdrom-raw' is an acceptable value
for deviceType for a CD-ROM drive. The documentation states that the VMX
configuration for a CD-ROM deviceType is as follows:
ide|scsi(n):(n).deviceType = "cdrom-raw|atapi-cdrom|cdrom-image"
From the documentation it appears the following is true:
- cdrom-image = Provides the ISO to the VM
- atapi-cdrom = Provides a NEC emulated ATAPI CD-ROM on top of the host
CD-ROM
- cdrom-raw = Passthru for a host CD-ROM drive. Allows CD-R burning from
within the guest.
A CD-ROM prior to this patch would always provide an 'atapi-cdrom' is
modeled as:
<disk type='block' device='cdrom'>
<source dev='/dev/scd0'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
This patch allows the 'device' attribute to be set to 'lun' for a raw
acccess CD-ROM such as:
<disk type='block' device='lun'>
<source dev='/dev/scd0'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
This commit is contained in:
13
tests/xml2vmxdata/xml2vmx-cdrom-ide-raw-device.vmx
Normal file
13
tests/xml2vmxdata/xml2vmx-cdrom-ide-raw-device.vmx
Normal file
@@ -0,0 +1,13 @@
|
||||
.encoding = "UTF-8"
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other"
|
||||
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
|
||||
displayName = "cdrom-ide-device"
|
||||
memsize = "4"
|
||||
numvcpus = "1"
|
||||
ide0:0.present = "true"
|
||||
ide0:0.deviceType = "cdrom-raw"
|
||||
ide0:0.fileName = "/dev/scd0"
|
||||
floppy0.present = "false"
|
||||
floppy1.present = "false"
|
||||
14
tests/xml2vmxdata/xml2vmx-cdrom-ide-raw-device.xml
Normal file
14
tests/xml2vmxdata/xml2vmx-cdrom-ide-raw-device.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='vmware'>
|
||||
<name>cdrom-ide-device</name>
|
||||
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
|
||||
<memory unit='KiB'>4096</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='block' device='lun'>
|
||||
<source dev='/dev/scd0'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
14
tests/xml2vmxdata/xml2vmx-cdrom-scsi-raw-device.vmx
Normal file
14
tests/xml2vmxdata/xml2vmx-cdrom-scsi-raw-device.vmx
Normal file
@@ -0,0 +1,14 @@
|
||||
.encoding = "UTF-8"
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other"
|
||||
uuid.bios = "56 4d 9b ef ac d9 b4 e0-c8 f0 ae a8 b9 10 35 15"
|
||||
displayName = "cdrom-scsi-device"
|
||||
memsize = "4"
|
||||
numvcpus = "1"
|
||||
scsi0.present = "true"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "cdrom-raw"
|
||||
scsi0:0.fileName = "/dev/scd0"
|
||||
floppy0.present = "false"
|
||||
floppy1.present = "false"
|
||||
14
tests/xml2vmxdata/xml2vmx-cdrom-scsi-raw-device.xml
Normal file
14
tests/xml2vmxdata/xml2vmx-cdrom-scsi-raw-device.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='vmware'>
|
||||
<name>cdrom-scsi-device</name>
|
||||
<uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
|
||||
<memory unit='KiB'>4096</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='block' device='lun'>
|
||||
<source dev='/dev/scd0'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
Reference in New Issue
Block a user