mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Allow multiple consoles per virtual guest
While Xen only has a single paravirt console, UML, and QEMU both support multiple paravirt consoles. The LXC driver can also be trivially made to support multiple consoles. This patch extends the XML to allow multiple <console> elements in the XML. It also makes the UML and QEMU drivers support this config. * src/conf/domain_conf.c, src/conf/domain_conf.h: Allow multiple <console> devices * src/lxc/lxc_driver.c, src/xen/xen_driver.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c: Update for internal API changes * src/security/security_selinux.c, src/security/virt-aa-helper.c: Only label consoles that aren't a copy of the serial device * src/qemu/qemu_command.c, src/qemu/qemu_driver.c, src/qemu/qemu_process.c, src/uml/uml_conf.c, src/uml/uml_driver.c: Support multiple console devices * tests/qemuxml2xmltest.c, tests/qemuxml2argvtest.c: Extra tests for multiple virtio consoles. Set QEMU_CAPS_CHARDEV for all console /channel tests * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args, tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args tests/qemuxml2argvdata/qemuxml2argv-console-virtio.args: Update for correct chardev syntax * tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.args, tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml: New test file
This commit is contained in:
@@ -2681,12 +2681,29 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<h6><a name="elementCharConsole">Console</a></h6>
|
||||
|
||||
<p>
|
||||
This represents the primary console. This can be the paravirtualized
|
||||
console with Xen guests, virtio console for QEMU/KVM, or duplicates
|
||||
the primary serial port for fully virtualized guests without a
|
||||
paravirtualized console.
|
||||
The console element is used to represent interactive consoles. Depending
|
||||
on the type of guest in use, the consoles might be paravirtualized devices,
|
||||
or they might be a clone of a serial device, according to the following
|
||||
rules:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>If no <code>targetType</code> attribue is set, then the default
|
||||
device type is according to the hypervisor's rules. The default
|
||||
type will be added when re-querying the XML fed into libvirt.
|
||||
For fully virtualized guests, the default device type will usually
|
||||
be a serial port.</li>
|
||||
<li>If the <code>targetType</code> attribute is <code>serial</code>,
|
||||
then if no <code><serial></code> element exists, the console
|
||||
element will be copied to the serial element. If a <code><serial></code>
|
||||
element does already exist, the console element will be ignored.</li>
|
||||
<li>If the <code>targetType</code> attribute is not <code>serial</code>,
|
||||
it will be treated normally.</li>
|
||||
<li>Only the first <code>console</code> element may use a <code>targetType</code>
|
||||
of <code>serial</code>. Secondary consoles must all be paravirtualized.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
A virtio console device is exposed in the
|
||||
guest as /dev/hvc[0-7] (for more information, see
|
||||
|
||||
Reference in New Issue
Block a user