mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03: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
40 lines
1.2 KiB
XML
40 lines
1.2 KiB
XML
<domain type='qemu'>
|
|
<name>QEMUGuest1</name>
|
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
<memory>219136</memory>
|
|
<currentMemory>219136</currentMemory>
|
|
<vcpu>1</vcpu>
|
|
<os>
|
|
<type arch='i686' machine='pc'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu</emulator>
|
|
<disk type='block' device='disk'>
|
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
|
<target dev='hda' bus='ide'/>
|
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
|
</disk>
|
|
<controller type='ide' index='0'/>
|
|
<serial type='udp'>
|
|
<source mode='bind' host='127.0.0.1' service='9999'/>
|
|
<source mode='connect' host='127.0.0.1' service='9998'/>
|
|
<target port='0'/>
|
|
</serial>
|
|
<serial type='udp'>
|
|
<source mode='connect' service='9999'/>
|
|
<target port='1'/>
|
|
</serial>
|
|
<console type='udp'>
|
|
<source mode='bind' host='127.0.0.1' service='9999'/>
|
|
<source mode='connect' host='127.0.0.1' service='9998'/>
|
|
<target type='serial' port='0'/>
|
|
</console>
|
|
<memballoon model='virtio'/>
|
|
</devices>
|
|
</domain>
|