This patch series adds support for serial & parallel devices to the QEMU
driver, and updates the Xen driver to support new syntax for HVM guests too.
The following syntax is used. Anywhere you see 'serial', you can equally
use 'console' or 'parallel'.
The 'serial' is for real serial devices only, likewise 'parallel' is for
parallel port devices only. 'console' tag is for paravirtualized
consoles. IF there is no paravirt console, then the first serial device
(if any) is also duplicated as a 'console' tag. This provides backwards
compatability with existing syntax.
- To attach device to STDIO - in essence this makes input /dev/null
and output goto the VM's logfile
<serial type='stdio'>
<target port="1"/>
</serial>
- To attach to a virtual console - accessed via Ctrl+Alt+'n' in the
SDL / VNC graphical console
<serial type='vc'>
<target port="1"/>
</serial>
- To send input & output to /dev/null
<serial type='null'>
<target port="1"/>
</serial>
- To auto-allocate a Pseudo TTY device
<serial type="pty">
<source path="/dev/pts/3"/>
<target port="1"/>
</serial>
NB special case if <console type='pty'>, then the TTY
path is also duplicated as an attribute tty='/dv/pts/3'
on the top level <console> tag. This provides compat
with existing syntax for <console> tags.
- To attach to a host device
<serial type="dev">
<source path="/dev/ttyS0"/>
<target port="1"/>
</serial>
- To operate as a TCP client
<serial type="tcp">
<source mode="connect" host="0.0.0.0"
service="2445"/>
<target port="1"/>
</serial>
- To operate as a TCP client
<serial type="tcp">
<source mode="bind" host="0.0.0.0"
service="2445"/>
<target port="1"/>
</serial>
- To operate as a UDP network console
<serial type="udp">
<source mode="bind" host="0.0.0.0"
service="2445"/>
<source mode="connect" host="0.0.0.0"
service="2445"/>
<target port="1"/>
</serial>
- To operate as a UNIX domain socket server
<serial type="unix">
<source mode="bind" path="/tmp/foo"/>
<target port="1"/>
</serial>
This is sufficient flexibility to represent all QEMU character device modes,
Xen paravirt console, LXC container fake console and the Solaris LDoms
console, and VMWare serial devices.
This series of patches updates the Xen and QEMU drivers, and their test
suites. A later patch will also update the LXC driver to this new syntax.
I was going to document this all in the format.html page, but looking at
the content there it needs a complete re-write. The split between Xen and
QEMU formats is pointless because they share 95% of the their config. Both
the Xen and QEMU descriptions are outdated, and the Xen PV vs HVM split is
also less than useful since they have much more commmonaility now. I intend
to re-write it to describe each element / attribute in turn, and then at
the end provide some example configs for each driver.
Dan.
--
|: Red Hat, Engineering, Boston -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|