]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Emit bootindex even for direct boot
authorJiri Denemark <jdenemar@redhat.com>
Mon, 23 Jan 2012 15:35:25 +0000 (16:35 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 25 Jan 2012 09:38:01 +0000 (10:38 +0100)
Direct boot (using kernel, initrd, and command line) is used by
virt-install/virt-manager for network install. While any bootindex has
no direct effect since -kernel is always first, we need it as a hint for
SeaBIOS to present disks in the same order as they will be presented
during normal boot.

src/qemu/qemu_command.c

index aaccf62b6e799c7f746ff8e55a0c5300a0816bae..9b69ad00e8059b03f275af09bfe8728375fd178c 100644 (file)
@@ -4334,8 +4334,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     if (qemuCapsGet(qemuCaps, QEMU_CAPS_DRIVE)) {
         int bootCD = 0, bootFloppy = 0, bootDisk = 0;
 
-        if ((qemuCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) || emitBootindex) &&
-            !def->os.kernel) {
+        if ((qemuCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) || emitBootindex)) {
             /* bootDevs will get translated into either bootindex=N or boot=on
              * depending on what qemu supports */
             for (i = 0 ; i < def->os.nBootDevs ; i++) {