xref: /kvmtool/Documentation/virtio-console.txt (revision f616b10ba905b79707a2d398090b53f897899aae)
1General
2--------
3
4virtio-console as the name implies is a console over virtio transport. Here is
5a simple head to head comparison of the virtio-console vs regular 8250 console:
6
78250 serial console:
8
9 - Requires CONFIG_SERIAL_8250=y and CONFIG_SERIAL_8250_CONSOLE=y kernel configs,
10which are enabled almost everywhere.
11 - Doesn't require guest-side changes.
12 - Compatible with older guests.
13
14virtio-console:
15
16 - Requires CONFIG_VIRTIO_CONSOLE=y (along with all other virtio dependencies),
17which got enabled only in recent kernels (but not all of them).
18 - Much faster.
19 - Consumes less processing resources.
20 - Requires guest-side changes.
21
22Enabling virtio-console
23------------------------
24
25First, make sure guest kernel is built with CONFIG_VIRTIO_CONSOLE=y. Once this
26is done, the following has to be done inside guest image:
27
28 - Add the following line to /etc/inittab:
29	'hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
30 - Add 'hvc0' to /etc/securetty (so you could actually log on)
31 - Start the guest with '--console virtio'
32
33Common errors
34--------------
35
36Q: I don't see anything on the screen!
37A: Make sure CONFIG_VIRTIO_CONSOLE=y is enabled in the *guest* kernel, also
38make sure you've updated /etc/inittab
39
40Q: It won't accept my username/password, but I enter them correctly!
41A: You didn't add 'hvc0' to /etc/securetty
42