mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +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)
|
if (enableKVM)
|
||||||
virCommandAddArg(cmd, "-enable-kvm");
|
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
|
/* Set '-m MB' based on maxmem, because the lower 'memory' limit
|
||||||
* is set post-startup using the balloon driver. If balloon driver
|
* is set post-startup using the balloon driver. If balloon driver
|
||||||
* is not supported, then they're out of luck anyway. Update the
|
* is not supported, then they're out of luck anyway. Update the
|
||||||
@ -7581,6 +7586,10 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
|
|||||||
WANT_VALUE();
|
WANT_VALUE();
|
||||||
if (!(def->os.kernel = strdup(val)))
|
if (!(def->os.kernel = strdup(val)))
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
} else if (STREQ(arg, "-bios")) {
|
||||||
|
WANT_VALUE();
|
||||||
|
if (!(def->os.loader = strdup(val)))
|
||||||
|
goto no_memory;
|
||||||
} else if (STREQ(arg, "-initrd")) {
|
} else if (STREQ(arg, "-initrd")) {
|
||||||
WANT_VALUE();
|
WANT_VALUE();
|
||||||
if (!(def->os.initrd = strdup(val)))
|
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 \
|
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 \
|
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||||
-hda /dev/HostVG/QEMUGuest1 -serial pty \
|
-hda /dev/HostVG/QEMUGuest1 -serial pty \
|
||||||
-usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 \
|
-usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 \
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<vcpu>1</vcpu>
|
<vcpu>1</vcpu>
|
||||||
<os>
|
<os>
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
|
<loader>/usr/share/seabios/bios.bin</loader>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
<bootmenu enable='yes'/>
|
<bootmenu enable='yes'/>
|
||||||
<bios useserial='yes'/>
|
<bios useserial='yes'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user