The QEMU argv -> virDomainDef conversion code was not handling
-drive arguments using the floppy bus. This caused them to be
added as hard disks instead.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_command.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b90a6b1..df1eb89 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -12036,6 +12036,9 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
}
} else if (STREQ(values[i], "scsi")) {
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
+ } else if (STREQ(values[i], "floppy")) {
+ def->bus = VIR_DOMAIN_DISK_BUS_FDC;
+ def->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY;
} else if (STREQ(values[i], "virtio")) {
def->bus = VIR_DOMAIN_DISK_BUS_VIRTIO;
} else if (STREQ(values[i], "xen")) {
@@ -12205,6 +12208,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
ignore_value(VIR_STRDUP(def->dst, "vda"));
} else if (def->bus == VIR_DOMAIN_DISK_BUS_XEN) {
ignore_value(VIR_STRDUP(def->dst, "xvda"));
+ } else if (def->bus == VIR_DOMAIN_DISK_BUS_FDC) {
+ ignore_value(VIR_STRDUP(def->dst, "fda"));
} else {
ignore_value(VIR_STRDUP(def->dst, "hda"));
}
--
2.5.0