On 1/5/21 4:54 PM, Martin Kletzander wrote:
This is perfectly valid in VMWare and the VM just boots with an empty drive. We
used to just skip the whole drive before, but since we changed how we parse
empty cdrom drives this now results in an error and the user not being able to
even dump the XML. Instead of erroring out, just keep the drive empty.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1903953
v3:
- Fixed the vmware driver
- Bit of a clean-up
- Few more tests
v2:
- Do not report and reset an error, but handle it more nicely.
- https://www.redhat.com/archives/libvir-list/2020-December/msg00846.html
v1:
- https://www.redhat.com/archives/libvir-list/2020-December/msg00840.html
Martin Kletzander (8):
esx: Unindent unnecessary conditional branch
tests: Use g_autofree in testParseVMXFileName
vmx: Make virVMXParseFileName return an integer
tests: Allow testing for parse failures in vmx2xmltest
vmx: Allow missing cdrom image file in virVMXParseFileName
tests: Test vmx files with missing images
esx: Handle missing images in esxParseVMXFileName
vmx: Treat missing cdrom-image as empty drive
src/esx/esx_driver.c | 160 ++++++++++--------
src/vmware/vmware_conf.c | 21 ++-
src/vmware/vmware_conf.h | 10 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 27 +--
src/vmx/vmx.h | 5 +-
...x2xml-cdrom-ide-file-missing-datastore.vmx | 6 +
.../vmx2xml-cdrom-ide-file-missing-file.vmx | 6 +
...ml-harddisk-ide-file-missing-datastore.vmx | 6 +
...mx2xml-harddisk-scsi-file-missing-file.vmx | 7 +
tests/vmx2xmltest.c | 67 +++++---
11 files changed, 203 insertions(+), 118 deletions(-)
create mode 100644
tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx
create mode 100644
tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx
create mode 100644
tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx
Reviewed-by: Michal Privoznik <mpriv...@redhat.com>
Michal