提交 ddf2dfa1 编写于 作者: D Daniel P. Berrange

Wire up <loader> to set the QEMU BIOS path

* 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>
上级 fd3f67e9
......@@ -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)))
......
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 \
......
......@@ -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'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册