mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
vmx: Treat missing cdrom-image as empty drive
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 results in an error. Make it behave more closer to VMWare. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1903953 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
2e6c131487
commit
3b364c6509
@ -2448,7 +2448,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
|
||||
}
|
||||
|
||||
virDomainDiskSetType(*def, VIR_STORAGE_TYPE_FILE);
|
||||
if (ctx->parseFileName(fileName, ctx->opaque, &tmp, false) < 0)
|
||||
if (ctx->parseFileName(fileName, ctx->opaque, &tmp, true) < 0)
|
||||
goto cleanup;
|
||||
virDomainDiskSetSource(*def, tmp);
|
||||
VIR_FREE(tmp);
|
||||
|
@ -247,8 +247,8 @@ mymain(void)
|
||||
DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect");
|
||||
DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect");
|
||||
|
||||
DO_TEST_FAIL("cdrom-ide-file-missing-datastore", "cdrom-ide-empty");
|
||||
DO_TEST_FAIL("cdrom-ide-file-missing-file", "cdrom-ide-empty");
|
||||
DO_TEST("cdrom-ide-file-missing-datastore", "cdrom-ide-empty");
|
||||
DO_TEST("cdrom-ide-file-missing-file", "cdrom-ide-empty");
|
||||
|
||||
DO_TEST_FAIL("harddisk-ide-file-missing-datastore", "harddisk-ide-file");
|
||||
DO_TEST_FAIL("harddisk-scsi-file-missing-file", "harddisk-scsi-file");
|
||||
|
Loading…
x
Reference in New Issue
Block a user