Configure the console by using the console element.
Procedure
-
You configure the host representation of the
console by using the console type attribute (see <console>).
To configure a pty console, enter:
| console type attribute: |
pty |
-
You configure the virtual server representation of the
console by using the target type attribute (see <target> as child element of <console>).
To configure a service-call logical processor (SCLP) console interface, enter the "sclp"
value.
| target type attribute: |
sclp |
You can also configure a virtio console by entering the target type attribute value
"virtio".
- Optional:
Specify a log file which collects the console output in addition to the display in the console
window.
Use the log element to specify the log file (see
<log>). Optionally, you can specify whether or not the log file will be
overwritten in case of a
virtual server restart.
By default, the log file is overwritten.
| log file attribute: |
<log-file> |
| log append attribute: |
off | on |
Example
This example configures a pty console. The console output is collected in
the file /var/log/libvirt/qemu/vserv-cons0.log. A virtual server restart overwrites the log
file.<devices>
...
<console type="pty">
<target type="sclp" port="0"/>
<log file="/var/log/libvirt/qemu/vserv-cons0.log" append="off"/>
</console>
</devices>