aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2010-07-30 16:38:48 +0200
committerDaniel Veillard <veillard@redhat.com>2010-07-30 16:38:48 +0200
commite7da872294bd1cfaa9733e1292476221659ab47b (patch)
tree7cfa132249516a5a17cea37dd4678203facf0902
parentFix a memory leak in the qemudBuildCommandLine. (diff)
downloadlibvirt-e7da872294bd1cfaa9733e1292476221659ab47b.tar.gz
libvirt-e7da872294bd1cfaa9733e1292476221659ab47b.tar.bz2
libvirt-e7da872294bd1cfaa9733e1292476221659ab47b.zip
Do not activate boot=on on devices when not using KVM
Basically the 'boot=on' boot selection device is something present in KVM but not in upstream QEmu, as a result if we boot a QEmu domain without KVM acceleration we must disable boot=on ... even if the front end kvm binary expose that capability in the help page. * src/qemu/qemu_conf.c: in qemudBuildCommandLine if -no-kvm is passed, then deactivate QEMUD_CMD_FLAG_DRIVE_BOOT
-rw-r--r--src/qemu/qemu_conf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index a79e0d7d8..57bc02fac 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -3707,9 +3707,17 @@ int qemudBuildCommandLine(virConnectPtr conn,
* 2. The qemu binary has the -no-kvm flag
*/
if ((qemuCmdFlags & QEMUD_CMD_FLAG_KVM) &&
- def->virtType == VIR_DOMAIN_VIRT_QEMU)
+ def->virtType == VIR_DOMAIN_VIRT_QEMU) {
disableKVM = 1;
+ /*
+ * do not use boot=on for drives when not using KVM since this
+ * is not supported at all in upstream QEmu.
+ */
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT)
+ qemuCmdFlags -= QEMUD_CMD_FLAG_DRIVE_BOOT;
+ }
+
/* Should explicitly enable KVM if
* 1. Guest domain is 'kvm'
* 2. The qemu binary has the -enable-kvm flag