mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
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>
This commit is contained in:
parent
fd3f67e9d3
commit
ddf2dfa1f7
@ -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)))
|
||||
|
@ -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 \
|
||||
|
@ -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'/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user