[RFC v3 2/2] qemu: add index for isa-serial device using target.port

Ani Sinha ani at anisinha.ca
Tue Jan 11 10:38:36 UTC 2022


SOB line is missing. Patches are not accepted without SOB.

On Mon, 10 Jan 2022, Divya Garg wrote:

> VM XML accepts target.port but this does not get passed while building the qemu
> command line for this VM.
> ---
>  src/qemu/qemu_command.c                       | 22 ++++++++++++++-----
>  tests/qemuxml2argvdata/bios.args              |  2 +-
>  .../qemuxml2argvdata/console-compat-auto.args |  2 +-
>  .../console-compat-auto.x86_64-latest.args    |  2 +-
>  .../console-compat-chardev.args               |  2 +-
>  .../console-compat-chardev.x86_64-latest.args |  2 +-
>  tests/qemuxml2argvdata/console-compat.args    |  2 +-
>  .../console-compat.x86_64-latest.args         |  2 +-
>  .../qemuxml2argvdata/console-virtio-many.args |  2 +-
>  tests/qemuxml2argvdata/controller-order.args  |  2 +-
>  .../name-escape.x86_64-2.11.0.args            |  4 ++--
>  .../name-escape.x86_64-latest.args            |  4 ++--
>  .../q35-virt-manager-basic.args               |  2 +-
>  .../serial-dev-chardev-iobase.args            |  2 +-
>  ...rial-dev-chardev-iobase.x86_64-latest.args |  2 +-
>  .../qemuxml2argvdata/serial-dev-chardev.args  |  2 +-
>  .../serial-dev-chardev.x86_64-latest.args     |  2 +-
>  .../qemuxml2argvdata/serial-file-chardev.args |  2 +-
>  .../serial-file-chardev.x86_64-latest.args    |  2 +-
>  tests/qemuxml2argvdata/serial-file-log.args   |  2 +-
>  .../serial-file-log.x86_64-latest.args        |  2 +-
>  .../qemuxml2argvdata/serial-many-chardev.args |  4 ++--
>  .../serial-many-chardev.x86_64-latest.args    |  4 ++--
>  .../qemuxml2argvdata/serial-pty-chardev.args  |  2 +-
>  .../serial-pty-chardev.x86_64-latest.args     |  2 +-
>  tests/qemuxml2argvdata/serial-spiceport.args  |  2 +-
>  .../serial-spiceport.x86_64-latest.args       |  2 +-
>  .../qemuxml2argvdata/serial-tcp-chardev.args  |  2 +-
>  .../serial-tcp-chardev.x86_64-latest.args     |  2 +-
>  .../serial-tcp-telnet-chardev.args            |  2 +-
>  ...rial-tcp-telnet-chardev.x86_64-latest.args |  2 +-
>  .../serial-tcp-tlsx509-chardev-notls.args     |  4 ++--
>  ...p-tlsx509-chardev-notls.x86_64-latest.args |  4 ++--
>  .../serial-tcp-tlsx509-chardev-verify.args    |  4 ++--
>  ...-tlsx509-chardev-verify.x86_64-latest.args |  4 ++--
>  .../serial-tcp-tlsx509-chardev.args           |  4 ++--
>  ...ial-tcp-tlsx509-chardev.x86_64-latest.args |  4 ++--
>  .../serial-tcp-tlsx509-secret-chardev.args    |  4 ++--
>  ...-tlsx509-secret-chardev.x86_64-latest.args |  4 ++--
>  .../qemuxml2argvdata/serial-udp-chardev.args  |  4 ++--
>  .../serial-udp-chardev.x86_64-latest.args     |  4 ++--
>  .../qemuxml2argvdata/serial-unix-chardev.args |  4 ++--
>  .../serial-unix-chardev.x86_64-latest.args    |  4 ++--
>  tests/qemuxml2argvdata/serial-vc-chardev.args |  2 +-
>  .../serial-vc-chardev.x86_64-latest.args      |  2 +-
>  tests/qemuxml2argvdata/user-aliases.args      |  4 ++--
>  .../virtio-9p-createmode.x86_64-latest.args   |  2 +-
>  .../virtio-9p-multidevs.x86_64-latest.args    |  2 +-
>  .../x86_64-pc-graphics.x86_64-latest.args     |  2 +-
>  .../x86_64-pc-headless.x86_64-latest.args     |  2 +-
>  .../x86_64-q35-graphics.x86_64-latest.args    |  2 +-
>  .../x86_64-q35-headless.x86_64-latest.args    |  2 +-
>  52 files changed, 85 insertions(+), 73 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index d822533ccb..a1fd5443be 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -10717,6 +10717,7 @@ qemuBuildSerialChrDeviceProps(const virDomainDef *def,
>  {
>      g_autoptr(virJSONValue) props = NULL;
>      g_autofree char *chardev = g_strdup_printf("char%s", serial->info.alias);
> +    const char *typestr;
>      virQEMUCapsFlags caps;
>
>      switch ((virDomainChrSerialTargetModel) serial->targetModel) {
> @@ -10750,11 +10751,22 @@ qemuBuildSerialChrDeviceProps(const virDomainDef *def,
>          return NULL;
>      }
>
> -    if (virJSONValueObjectAdd(&props,
> -                              "s:driver", virDomainChrSerialTargetModelTypeToString(serial->targetModel),
> -                              "s:chardev", chardev,
> -                              "s:id", serial->info.alias,
> -                              NULL) < 0)
> +    typestr = virDomainChrSerialTargetModelTypeToString(serial->targetModel);
> +
> +    if (serial->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL) {
> +            if (virJSONValueObjectAdd(&props,
> +                                      "s:driver", typestr,
> +                                      "s:chardev", chardev,
> +                                      "s:id", serial->info.alias,
> +                                      "k:index", serial->target.port,
> +                                      NULL) < 0)
> +                    return NULL;
> +    }
> +    else if (virJSONValueObjectAdd(&props,
> +                                   "s:driver", typestr,
> +                                   "s:chardev", chardev,
> +                                   "s:id", serial->info.alias,
> +                                   NULL) < 0)
>          return NULL;
>
>      if (qemuBuildDeviceAddressProps(props, def, &serial->info) < 0)
> diff --git a/tests/qemuxml2argvdata/bios.args b/tests/qemuxml2argvdata/bios.args
> index 0469b7419e..62ec87541d 100644
> --- a/tests/qemuxml2argvdata/bios.args
> +++ b/tests/qemuxml2argvdata/bios.args
> @@ -31,7 +31,7 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device usb-tablet,id=input0,bus=usb.0,port=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/console-compat-auto.args b/tests/qemuxml2argvdata/console-compat-auto.args
> index 5285d0749a..9c459b641b 100644
> --- a/tests/qemuxml2argvdata/console-compat-auto.args
> +++ b/tests/qemuxml2argvdata/console-compat-auto.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/console-compat-auto.x86_64-latest.args b/tests/qemuxml2argvdata/console-compat-auto.x86_64-latest.args
> index 7b31c86820..bf25c0b771 100644
> --- a/tests/qemuxml2argvdata/console-compat-auto.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/console-compat-auto.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/console-compat-chardev.args b/tests/qemuxml2argvdata/console-compat-chardev.args
> index 5285d0749a..9c459b641b 100644
> --- a/tests/qemuxml2argvdata/console-compat-chardev.args
> +++ b/tests/qemuxml2argvdata/console-compat-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/console-compat-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/console-compat-chardev.x86_64-latest.args
> index 7b31c86820..bf25c0b771 100644
> --- a/tests/qemuxml2argvdata/console-compat-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/console-compat-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/console-compat.args b/tests/qemuxml2argvdata/console-compat.args
> index 9f37788586..709a82faad 100644
> --- a/tests/qemuxml2argvdata/console-compat.args
> +++ b/tests/qemuxml2argvdata/console-compat.args
> @@ -30,5 +30,5 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/console-compat.x86_64-latest.args b/tests/qemuxml2argvdata/console-compat.x86_64-latest.args
> index 17a356b480..d2a1f1b884 100644
> --- a/tests/qemuxml2argvdata/console-compat.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/console-compat.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/console-virtio-many.args b/tests/qemuxml2argvdata/console-virtio-many.args
> index dc1aca1129..b509cd55b5 100644
> --- a/tests/qemuxml2argvdata/console-virtio-many.args
> +++ b/tests/qemuxml2argvdata/console-virtio-many.args
> @@ -31,7 +31,7 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev pty,id=charconsole1 \
>  -device virtconsole,chardev=charconsole1,id=console1 \
>  -chardev pty,id=charconsole2 \
> diff --git a/tests/qemuxml2argvdata/controller-order.args b/tests/qemuxml2argvdata/controller-order.args
> index 51571a27bf..51fa04dfd8 100644
> --- a/tests/qemuxml2argvdata/controller-order.args
> +++ b/tests/qemuxml2argvdata/controller-order.args
> @@ -37,7 +37,7 @@ QEMU_AUDIO_DRV=spice \
>  -chardev spicevmc,id=charsmartcard0,name=smartcard \
>  -device ccid-card-passthru,chardev=charsmartcard0,id=smartcard0,bus=ccid0.0 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev spicevmc,id=charchannel0,name=vdagent \
>  -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
>  -device usb-tablet,id=input0,bus=usb.0,port=1.2 \
> diff --git a/tests/qemuxml2argvdata/name-escape.x86_64-2.11.0.args b/tests/qemuxml2argvdata/name-escape.x86_64-2.11.0.args
> index 1ce91ff354..a57adedfa5 100644
> --- a/tests/qemuxml2argvdata/name-escape.x86_64-2.11.0.args
> +++ b/tests/qemuxml2argvdata/name-escape.x86_64-2.11.0.args
> @@ -32,9 +32,9 @@ QEMU_AUDIO_DRV=spice \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,write-cache=on \
>  -device ccid-card-emulated,backend=certificates,cert1=cert1,,foo,cert2=cert2,cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \
>  -chardev tty,id=charserial0,path=/dev/ttyS2,,foo \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=1 \
>  -chardev file,id=charserial1,path=/tmp/serial.log,,foo,append=on \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=0 \
>  -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
>  -netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
>  -vnc vnc=unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
> diff --git a/tests/qemuxml2argvdata/name-escape.x86_64-latest.args b/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
> index 336ea5f4d4..c330dd52f3 100644
> --- a/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
> @@ -34,10 +34,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-foo=1,bar=2/.config \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1,"write-cache":"on"}' \
>  -device '{"driver":"ccid-card-emulated","backend":"certificates","cert1":"cert1,foo","cert2":"cert2","cert3":"cert3","db":"/etc/pki/nssdb,foo","id":"smartcard0","bus":"ccid0.0"}' \
>  -chardev tty,id=charserial0,path=/dev/ttyS2,,foo \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":1}' \
>  -add-fd set=0,fd=1750 \
>  -chardev file,id=charserial1,path=/dev/fdset/0,append=on \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":0}' \
>  -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
>  -netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
>  -audiodev '{"id":"audio1","driver":"spice"}' \
> diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
> index 6e84c9ca2a..a33a74e355 100644
> --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.args
> +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
> @@ -40,7 +40,7 @@ QEMU_AUDIO_DRV=spice \
>  -netdev user,id=hostnet0 \
>  -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:9a:e6:c6,bus=pci.1,addr=0x0 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev socket,id=charchannel0,path=/tmp/channel/domain--1-virt-manager-basic/org.qemu.guest_agent.0,server=on,wait=off \
>  -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
>  -chardev spicevmc,id=charchannel1,name=vdagent \
> diff --git a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
> index dfa6785795..1f358b6469 100644
> --- a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
> +++ b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev tty,id=charserial0,path=/dev/ttyS2 \
> --device isa-serial,chardev=charserial0,id=serial0,iobase=1016,irq=4 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0,iobase=1016,irq=4 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
> index 512d1f7e9d..45e1584a5e 100644
> --- a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev tty,id=charserial0,path=/dev/ttyS2 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","iobase":1016,"irq":4}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0,"iobase":1016,"irq":4}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-dev-chardev.args b/tests/qemuxml2argvdata/serial-dev-chardev.args
> index c325f21e0c..47da5b8454 100644
> --- a/tests/qemuxml2argvdata/serial-dev-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-dev-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev tty,id=charserial0,path=/dev/ttyS2 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
> index cfa0f8ce02..746f6d34a1 100644
> --- a/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev tty,id=charserial0,path=/dev/ttyS2 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-file-chardev.args b/tests/qemuxml2argvdata/serial-file-chardev.args
> index 4cbd0edf1c..5b8f3be45a 100644
> --- a/tests/qemuxml2argvdata/serial-file-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-file-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev file,id=charserial0,path=/tmp/serial.log,append=on \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-file-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-file-chardev.x86_64-latest.args
> index 9c7fd01f97..355599ca41 100644
> --- a/tests/qemuxml2argvdata/serial-file-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-file-chardev.x86_64-latest.args
> @@ -33,7 +33,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -add-fd set=0,fd=1750 \
>  -chardev file,id=charserial0,path=/dev/fdset/0,append=on \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-file-log.args b/tests/qemuxml2argvdata/serial-file-log.args
> index c4c6106200..9ee066ef49 100644
> --- a/tests/qemuxml2argvdata/serial-file-log.args
> +++ b/tests/qemuxml2argvdata/serial-file-log.args
> @@ -30,5 +30,5 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev file,id=charserial0,path=/tmp/serial.log,logfile=/var/lib/libvirt/qemu/demo-serial.log,logappend=off \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-file-log.x86_64-latest.args b/tests/qemuxml2argvdata/serial-file-log.x86_64-latest.args
> index f7f59bc542..2444e64345 100644
> --- a/tests/qemuxml2argvdata/serial-file-log.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-file-log.x86_64-latest.args
> @@ -34,7 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -add-fd set=0,fd=1750 \
>  -add-fd set=1,fd=1751 \
>  -chardev file,id=charserial0,path=/dev/fdset/0,append=on,logfile=/dev/fdset/1,logappend=on \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-many-chardev.args b/tests/qemuxml2argvdata/serial-many-chardev.args
> index 2c548c9e4b..da0d0b21c3 100644
> --- a/tests/qemuxml2argvdata/serial-many-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-many-chardev.args
> @@ -30,8 +30,8 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev file,id=charserial1,path=/tmp/serial.log \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-many-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-many-chardev.x86_64-latest.args
> index 1e0f0110bf..22268f8d1b 100644
> --- a/tests/qemuxml2argvdata/serial-many-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-many-chardev.x86_64-latest.args
> @@ -32,10 +32,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -add-fd set=0,fd=1750 \
>  -chardev file,id=charserial1,path=/dev/fdset/0,append=on \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-pty-chardev.args b/tests/qemuxml2argvdata/serial-pty-chardev.args
> index 5285d0749a..9c459b641b 100644
> --- a/tests/qemuxml2argvdata/serial-pty-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-pty-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-pty-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-pty-chardev.x86_64-latest.args
> index 7b31c86820..bf25c0b771 100644
> --- a/tests/qemuxml2argvdata/serial-pty-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-pty-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-spiceport.args b/tests/qemuxml2argvdata/serial-spiceport.args
> index 43e65a0679..704e6d1820 100644
> --- a/tests/qemuxml2argvdata/serial-spiceport.args
> +++ b/tests/qemuxml2argvdata/serial-spiceport.args
> @@ -29,7 +29,7 @@ QEMU_AUDIO_DRV=spice \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev spiceport,id=charserial0,name=org.qemu.console.serial.0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device usb-tablet,id=input0,bus=usb.0,port=1 \
>  -spice port=5903,tls-port=5904,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on \
>  -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 \
> diff --git a/tests/qemuxml2argvdata/serial-spiceport.x86_64-latest.args b/tests/qemuxml2argvdata/serial-spiceport.x86_64-latest.args
> index f552782edf..e20e3c5cb6 100644
> --- a/tests/qemuxml2argvdata/serial-spiceport.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-spiceport.x86_64-latest.args
> @@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev spiceport,id=charserial0,name=org.qemu.console.serial.0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
>  -audiodev '{"id":"audio1","driver":"spice"}' \
>  -spice port=5903,tls-port=5904,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-chardev.args b/tests/qemuxml2argvdata/serial-tcp-chardev.args
> index aec7093d03..263add4409 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev socket,id=charserial0,host=127.0.0.1,port=9999 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-chardev.x86_64-latest.args
> index 33e6215ebb..3b7d32b967 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev socket,id=charserial0,host=127.0.0.1,port=9999 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.args b/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.args
> index 72f81d7938..13e092c4c7 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev socket,id=charserial0,host=127.0.0.1,port=9999,telnet=on,server=on,wait=off \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.x86_64-latest.args
> index 4433ce50f5..46e3878552 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-telnet-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev socket,id=charserial0,host=127.0.0.1,port=9999,telnet=on,server=on,wait=off \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.args
> index 7db40862e9..8bf070d820 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.args
> @@ -30,8 +30,8 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.x86_64-latest.args
> index f4c3ca4cbd..660d11d358 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-notls.x86_64-latest.args
> @@ -32,9 +32,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555 \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.args
> index f3dc5f5019..374d24ec00 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.args
> @@ -30,9 +30,9 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -object tls-creds-x509,id=objcharserial1_tls0,dir=/etc/pki/libvirt-chardev,endpoint=client,verify-peer=on \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.x86_64-latest.args
> index 39d8c562c0..20a0872d68 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev-verify.x86_64-latest.args
> @@ -32,10 +32,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -object '{"qom-type":"tls-creds-x509","id":"objcharserial1_tls0","dir":"/etc/pki/libvirt-chardev","endpoint":"client","verify-peer":true}' \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.args
> index f3dc5f5019..374d24ec00 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.args
> @@ -30,9 +30,9 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -object tls-creds-x509,id=objcharserial1_tls0,dir=/etc/pki/libvirt-chardev,endpoint=client,verify-peer=on \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.x86_64-latest.args
> index 39d8c562c0..20a0872d68 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-chardev.x86_64-latest.args
> @@ -32,10 +32,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -object '{"qom-type":"tls-creds-x509","id":"objcharserial1_tls0","dir":"/etc/pki/libvirt-chardev","endpoint":"client","verify-peer":true}' \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.args
> index 151629458b..2defeb28da 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.args
> @@ -30,10 +30,10 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -object secret,id=charserial1-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
>  -object tls-creds-x509,id=objcharserial1_tls0,dir=/etc/pki/libvirt-chardev,endpoint=client,verify-peer=on,passwordid=charserial1-secret0 \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest.args
> index 4f20639bcf..577ff2fbf6 100644
> --- a/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest.args
> @@ -32,11 +32,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,localport=1111 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -object '{"qom-type":"secret","id":"charserial1-secret0","data":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw==","format":"base64"}' \
>  -object '{"qom-type":"tls-creds-x509","id":"objcharserial1_tls0","dir":"/etc/pki/libvirt-chardev","endpoint":"client","verify-peer":true,"passwordid":"charserial1-secret0"}' \
>  -chardev socket,id=charserial1,host=127.0.0.1,port=5555,tls-creds=objcharserial1_tls0 \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
> diff --git a/tests/qemuxml2argvdata/serial-udp-chardev.args b/tests/qemuxml2argvdata/serial-udp-chardev.args
> index 9d2f2e03e9..de6621f0e2 100644
> --- a/tests/qemuxml2argvdata/serial-udp-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-udp-chardev.args
> @@ -30,8 +30,8 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=9998,localaddr=127.0.0.1,localport=9999 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev udp,id=charserial1,host=,port=9999,localaddr=,localport=0 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-udp-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-udp-chardev.x86_64-latest.args
> index 95e6e6ed90..95e2dc98e6 100644
> --- a/tests/qemuxml2argvdata/serial-udp-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-udp-chardev.x86_64-latest.args
> @@ -32,9 +32,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev udp,id=charserial0,host=127.0.0.1,port=9998,localaddr=127.0.0.1,localport=9999 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev udp,id=charserial1,host=,port=9999,localaddr=,localport=0 \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-unix-chardev.args b/tests/qemuxml2argvdata/serial-unix-chardev.args
> index 19731b02b2..1e2444f824 100644
> --- a/tests/qemuxml2argvdata/serial-unix-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-unix-chardev.args
> @@ -28,8 +28,8 @@ QEMU_AUDIO_DRV=none \
>  -boot strict=on \
>  -usb \
>  -chardev socket,id=charserial0,path=/tmp/serial.sock \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev socket,id=charserial1,path=/tmp/serial-server.sock,server=on,wait=off \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
> index 1e3d5772b4..1387fc9a1d 100644
> --- a/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
> @@ -29,9 +29,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -boot strict=on \
>  -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
>  -chardev socket,id=charserial0,path=/tmp/serial.sock \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charserial1,fd=1729,server=on,wait=off \
> --device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/serial-vc-chardev.args b/tests/qemuxml2argvdata/serial-vc-chardev.args
> index d28a3eee47..09b33a15ee 100644
> --- a/tests/qemuxml2argvdata/serial-vc-chardev.args
> +++ b/tests/qemuxml2argvdata/serial-vc-chardev.args
> @@ -30,6 +30,6 @@ QEMU_AUDIO_DRV=none \
>  -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
>  -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
>  -chardev vc,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
>  -msg timestamp=on
> diff --git a/tests/qemuxml2argvdata/serial-vc-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-vc-chardev.x86_64-latest.args
> index d15062b94f..f08dd46e63 100644
> --- a/tests/qemuxml2argvdata/serial-vc-chardev.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/serial-vc-chardev.x86_64-latest.args
> @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
>  -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
>  -chardev vc,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -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 \
> diff --git a/tests/qemuxml2argvdata/user-aliases.args b/tests/qemuxml2argvdata/user-aliases.args
> index 486473a566..8608144b5e 100644
> --- a/tests/qemuxml2argvdata/user-aliases.args
> +++ b/tests/qemuxml2argvdata/user-aliases.args
> @@ -55,9 +55,9 @@ QEMU_AUDIO_DRV=none \
>  -device rtl8139,netdev=hostua-AndAlsoClientMode,id=ua-AndAlsoClientMode,mac=52:54:00:8c:b1:f8,bus=pci.0,addr=0xa \
>  -device ccid-card-emulated,backend=nss-emulated,id=smartcard0,bus=ua-myCCID.0 \
>  -chardev pty,id=charserial0 \
> --device isa-serial,chardev=charserial0,id=serial0 \
> +-device isa-serial,chardev=charserial0,id=serial0,index=0 \
>  -chardev pty,id=charserial1 \
> --device isa-serial,chardev=charserial1,id=serial1 \
> +-device isa-serial,chardev=charserial1,id=serial1,index=1 \
>  -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/gentoo.org.qemu.guest_agent.0,server=on,wait=off \
>  -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
>  -vnc 127.0.0.1:0 \
> diff --git a/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args
> index 01fe01e3c6..d306b37b53 100644
> --- a/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args
> @@ -37,7 +37,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -fsdev local,security_model=mapped,id=fsdev-fs3,path=/export/fs3 \
>  -device '{"driver":"virtio-9p-pci","id":"fs3","fsdev":"fsdev-fs3","mount_tag":"fs3","bus":"pci.0","addr":"0x5"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0xc"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
> diff --git a/tests/qemuxml2argvdata/virtio-9p-multidevs.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-9p-multidevs.x86_64-latest.args
> index 8b325bb7ec..0752f09fe9 100644
> --- a/tests/qemuxml2argvdata/virtio-9p-multidevs.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/virtio-9p-multidevs.x86_64-latest.args
> @@ -35,7 +35,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
>  -fsdev local,security_model=mapped,multidevs=warn,id=fsdev-fs2,path=/export/fs2 \
>  -device '{"driver":"virtio-9p-pci","id":"fs2","fsdev":"fsdev-fs2","mount_tag":"fs2","bus":"pci.0","addr":"0x4"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
>  -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0xc"}' \
>  -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
> diff --git a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
> index 3cae9fafa0..8cad1d9f38 100644
> --- a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
> @@ -37,7 +37,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
>  -netdev user,id=hostnet0 \
>  -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:4c:e3:86","bus":"pci.0","addr":"0x3"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
>  -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
>  -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
> diff --git a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
> index fbfb823d83..3c4688a89e 100644
> --- a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
> @@ -38,7 +38,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
>  -netdev user,id=hostnet0 \
>  -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x2"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
>  -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
> diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
> index ca0e00f468..9e4c361ec9 100644
> --- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
> @@ -44,7 +44,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
>  -netdev user,id=hostnet0 \
>  -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:d2:70:0b","bus":"pci.1","addr":"0x0"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
>  -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
>  -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
> diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
> index c6970e349d..b4d90dff5e 100644
> --- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
> +++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
> @@ -45,7 +45,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
>  -netdev user,id=hostnet0 \
>  -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \
>  -chardev pty,id=charserial0 \
> --device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0"}' \
> +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
>  -chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
>  -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
>  -audiodev '{"id":"audio1","driver":"none"}' \
> --
> 2.25.1
>
>




More information about the libvir-list mailing list