libvirt/tests/qemuxml2argvdata/sound-device.x86_64-4.2.0.args
Michal Privoznik ecbce92371 qemu: Adapt to new way of specifying PC speaker
Historically, the way to set PC speaker for a guest was to pass:

  -soundhw pcspk

but as of QEMU commit v5.1.0-rc0~28^2~3 this is deprecated and we
should use:

  -machine pcspk-audiodev=$id

instead. The old way was then removed in commit v7.1.0-rc0~99^2~3.

Now, ideally we would have a capability selecting whether we talk
to a QEMU that understands the new way or not. But it's not that
simple - the machine attribute is just an alias to the .audiodev=
attribute of 'isa-pcspk' object and both are created in
pc_machine_initfn() function, i.e. not then the PC_MACHINE() class
is initialized, but when it's instantiated. IOW, it's not possible
for us to query whether we're dealing with older or newer QEMU.

But given that the newer version is supported since v5.1.0 and the
minimal version we require is v4.2.0 (i.e. there are two releases
which don't understand the newer cmd line) and how frequently this
feature is (un-)used (the issue was reported after ~1 year since it
stopped working), I believe we can live without any capability and
just use the newer cmd line unconditionally.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/490
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
2023-07-19 16:03:31 +02:00

50 lines
2.2 KiB
Plaintext

LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-4.2,usb=off,dump-guest-core=off,pcspk-audiodev=audio1 \
-accel tcg \
-cpu qemu64 \
-m size=219136k \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device ES1370,id=sound1,audiodev=audio1,bus=pci.0,addr=0x2 \
-device sb16,id=sound2,audiodev=audio1 \
-device AC97,id=sound3,audiodev=audio1,bus=pci.0,addr=0x3 \
-device intel-hda,id=sound4,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound4-codec0,bus=sound4.0,cad=0,audiodev=audio1 \
-device intel-hda,id=sound5,bus=pci.0,addr=0x5 \
-device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0,audiodev=audio1 \
-device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1,audiodev=audio1 \
-device hda-output,id=sound5-codec2,bus=sound5.0,cad=2,audiodev=audio1 \
-device ich9-intel-hda,id=sound6,bus=pci.0,addr=0x6 \
-device hda-duplex,id=sound6-codec0,bus=sound6.0,cad=0,audiodev=audio1 \
-device ich9-intel-hda,id=sound7,bus=pci.0,addr=0x7 \
-device hda-micro,id=sound7-codec0,bus=sound7.0,cad=0,audiodev=audio1 \
-device hda-duplex,id=sound7-codec1,bus=sound7.0,cad=1,audiodev=audio1 \
-device hda-output,id=sound7-codec2,bus=sound7.0,cad=2,audiodev=audio1 \
-device usb-audio,id=sound8,audiodev=audio1,multi=on,bus=usb.0,port=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on