A user came into #virt the other day and was trying to get libvirtd
to work with VMWare Fusion 5, which is basically the Mac OS X version of
VMWare Workstation. In helping him out I noticed a few limitations of our
VMX parser so I've added support through this patchset. However I came
across the fact that we only support 2 types of CD-ROMs instead of the 3
types that VMWare has which leads me to believe we need to extend our
XML syntax to define VMWare VMs so I'm asking for feedback and input.
CD-ROM types:
- cdrom-image = Provides the ISO to the domain
- atapi-cdrom = Provides a NEC emulated ATAPI CD-ROM
- cdrom-raw = Passthru for a host CD-ROM drive
Currently we model 'atapi-cdrom' as (example uses IDE):
<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>
I was thinking of making that:
<disk type='block' device='cdrom'>
<driver name='vmware' type='atapi'/>
<source dev='/dev/scd0'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
target='0' unit='0'/>
</disk>
And making 'cdrom-raw' as:
<disk type='block' device='cdrom'>
<driver name='vmware' type='raw'/>
<source dev='/dev/scd0'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
target='0' unit='0'/>
</disk>
The documentation is a bit ambiguous if I should instead do:
<driver name='atapi'/>
and
<driver name='raw'/>
Which is why the request for input.
The other reason I'm asking for input is I'm not quite sure what we want to
do about CD-ROMs marked as 'auto detect', which is what VMWare Workstation
and VMWare Fusion according to their documentation use as the default for
'cdrom-raw' device type. It will either at boot time connect your CD-ROM
drive to the VM or dynamically when the user requests it. In this patchset
I've modeled it as an opened CD-ROM drive and expect that VMWare will give
us a tray closed event or CD-ROM attached event when it gets attached. I
unfortunately don't have VMWare and have not used their products in many
years so I can't test this myself.
Doug Goldstein (5):
VMX: Improve disk parse error for unknown values
VMX: Add cdrom-raw dev type from VMWare Fusion
VMX: Add support for 'auto detect' fileNames
VMX: Some serial ports are not actually connected
VMX: Add a VMWare Fusion 5 configuration for tests
src/vmx/vmx.c | 41 ++++++----
.../vmx2xml-cdrom-ide-raw-auto-detect.vmx | 5 ++
.../vmx2xml-cdrom-ide-raw-auto-detect.xml | 23 ++++++
tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx | 5 ++
tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml | 24 ++++++
tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx | 88 ++++++++++++++++++++++
tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 38 ++++++++++
tests/vmx2xmltest.c | 4 +
8 files changed, 214 insertions(+), 14 deletions(-)
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-auto-detect.xml
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-raw-device.xml
create mode 100644 tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml
--
1.8.1.5