mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
d30d572650
The following XML: <serial type='udp'> <source mode='connect' service='9999'/> </serial> is accepted by domain_conf.c but maps to the qemu command line: -chardev udp,host=127.0.0.1,port=2222,localaddr=(null),localport=(null) qemu can cope with everything omitting except the connection port, which seems to also be the intent of domain_conf validation, so let's not generate bogus command lines for that case. The defaults are empty strings for addresses and 0 for the localport Additionally, tweak the qemu cli parsing to handle omitted host parameters for -serial udp
10 lines
628 B
Plaintext
10 lines
628 B
Plaintext
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
|
|
pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,\
|
|
id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,\
|
|
id=monitor,mode=readline -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -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 \
|
|
-chardev udp,id=charserial1,host=,port=9999,localaddr=,localport=0 \
|
|
-device isa-serial,chardev=charserial1,id=serial1 -usb -device \
|
|
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|