]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Wire up <loader> to set the QEMU BIOS path
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Apr 2012 14:02:13 +0000 (15:02 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Apr 2012 15:34:39 +0000 (16:34 +0100)
* src/qemu/qemu_command.c: Wire up -bios with <loader>
* tests/qemuxml2argvdata/qemuxml2argv-bios.args,
  tests/qemuxml2argvdata/qemuxml2argv-bios.xml: Expand
  existing BIOS test case to cover <loader>

src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-bios.args
tests/qemuxml2argvdata/qemuxml2argv-bios.xml

index ea9431fa311cc59d9249eef94eacc9ad7ba9c89a..c82f5bc2c62cb00ccb53dcc875662826cf232f97 100644 (file)
@@ -4052,6 +4052,11 @@ qemuBuildCommandLine(virConnectPtr conn,
     if (enableKVM)
         virCommandAddArg(cmd, "-enable-kvm");
 
+    if (def->os.loader) {
+        virCommandAddArg(cmd, "-bios");
+        virCommandAddArg(cmd, def->os.loader);
+    }
+
     /* Set '-m MB' based on maxmem, because the lower 'memory' limit
      * is set post-startup using the balloon driver. If balloon driver
      * is not supported, then they're out of luck anyway.  Update the
@@ -7581,6 +7586,10 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
             WANT_VALUE();
             if (!(def->os.kernel = strdup(val)))
                 goto no_memory;
+        } else if (STREQ(arg, "-bios")) {
+            WANT_VALUE();
+            if (!(def->os.loader = strdup(val)))
+                goto no_memory;
         } else if (STREQ(arg, "-initrd")) {
             WANT_VALUE();
             if (!(def->os.initrd = strdup(val)))
index f9727c436d0e814aeec7337da86ee7b29f6f1d24..ac980006c17bba3343128e9c1021b5b33ea98e31 100644 (file)
@@ -1,5 +1,6 @@
 LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
-/usr/bin/qemu -S -M pc -m 1024 -smp 1 -nodefaults -device sga \
+/usr/bin/qemu -S -M pc -bios /usr/share/seabios/bios.bin \
+-m 1024 -smp 1 -nodefaults -device sga \
 -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
 -hda /dev/HostVG/QEMUGuest1 -serial pty \
 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 \
index cfc558710d0a39bdd9a62742b64112395ef846ab..ac15d45b6b045c5a00a17166161adf47c782d7b5 100644 (file)
@@ -6,6 +6,7 @@
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
+    <loader>/usr/share/seabios/bios.bin</loader>
     <boot dev='hd'/>
     <bootmenu enable='yes'/>
     <bios useserial='yes'/>