mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00:00
c9b13e0557
Starting with QEMU-6.2 started accepting a JSON object as argument for '-device' which will also become the only syntax considered stable by qemu in the future. Since libvirt was recently converted to generate the properties via JSON to begin wit we can start using it on the commandline as well, by simply enabling the QEMU_CAPS_DEVICE_JSON capability, which we do by probing for the 'json-cli' feature flag of 'device_add'. Normally a change which changes a commandline output should be happening only after the impacted real-caps test files are forked in the version preceding the change, but in this case it's not necessary as the logic for generating the device properties stays identical and we just change the output format (avoid conversion). Additionally we still have a lot of tests validating the conversion to the old commandline options. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
LC_ALL=C \
|
|
PATH=/bin \
|
|
HOME=/tmp/lib/domain--1-TPM-VM \
|
|
USER=test \
|
|
LOGNAME=test \
|
|
XDG_DATA_HOME=/tmp/lib/domain--1-TPM-VM/.local/share \
|
|
XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \
|
|
XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \
|
|
/usr/bin/qemu-system-x86_64 \
|
|
-name guest=TPM-VM,debug-threads=on \
|
|
-S \
|
|
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-TPM-VM/master-key.aes"}' \
|
|
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \
|
|
-cpu qemu64 \
|
|
-m 2048 \
|
|
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \
|
|
-overcommit mem-lock=off \
|
|
-smp 1,sockets=1,cores=1,threads=1 \
|
|
-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
|
|
-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 \
|
|
-boot menu=on,strict=on \
|
|
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
|
|
-tpmdev passthrough,id=tpm-tpm0,path=/dev/fdset/0,cancel-path=/dev/fdset/1 \
|
|
-add-fd set=0,fd=1730 \
|
|
-add-fd set=1,fd=1731 \
|
|
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
|
-audiodev id=audio1,driver=none \
|
|
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
|
|
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
|
-msg timestamp=on
|