When installing Fedora as a DomU guest the kernel command line needs the option 'console=hvc0' appended. For example, kernel /vmlinuz-2.6.31-0.204.rc9.fc12.x86_64 ro root=/dev/mapper/vg_dhcplab136-lv_root rhgb quiet LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us becomes kernel /vmlinuz-2.6.31-0.204.rc9.fc12.x86_64 ro root=/dev/mapper/vg_dhcplab136-lv_root rhgb quiet console=hvc0 LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
An improvement on this is to add 'console=tty0 console=hvc0' instead of just console=hvc0. This allows the vnc connection to the DomU to still output boot messages as well. After the boot has completed only hvc0 will get the console messages. Whether or not to honor both consoles throughout the whole session is something to discuss elsewhere, but I think for at least for the boot, since already possible, it should be done. Please add 'console=tty0 console=hvc0' to the kernel command-line for DomU installations.
Can we even tell when we're doing a domU install?
There are several ways to detect this, and I see anaconda used to detect it by checking for the existence of /proc/xen. That said, I started a discussion about this with others on the virt team, and it was more or less agreed to try and change this in virt-install instead, i.e. always set console=hvc0, even if we're not currently using it, which allows anaconda to pick it up. Reassigning to that component.
Removing from F12VirtTarget for now, since we're waiting to see how virtio_console settles down AFAIR
What does setting console=hvc0 do? Provide PV guest xm console behavior for FV guests? If we add this at install time to the kernel cli, does anaconda then know to add it permanently to the generated grub.conf? If virt-install needs to set this, the downside is that it will only work for URL installs (which is the only time we can pass kernel parameters in).
console=hvc0 is for PV guests only. To get console for FV we would use the normal serial, e.g. console=ttyS0,115200n8 Here's the breakdown of all the cases (again this is for PV guests) 1) With _NO_ console= params we only get early boot messages to the console, and then nothing else, not even a login prompt. The VNC gets all console output, including shutdown messages and of course a vterm login. 2) With console=hvc0 we get a full console (all boot messages and a login). VNC _only_ gets a vterm login. All shutdown and other console messages go to the console (hvc0). 3) With 'console=tty0 console=hvc0' we get the same as (2), but we also get boot messages to the VNC. VNC doesn't get anything else, but boot messages are nice to have there, so I see this as an improvement. At the time I wrote this bug we only got (1) after a normal installation, so VNC had to be used until the kernel command line was manually modified. I don't know the state of this now since I've been adding console=hvc0 to my kickstarts for months. We should recheck it.
*** Bug 611210 has been marked as a duplicate of this bug. ***
(In reply to comment #6) > console=hvc0 is for PV guests only. To get console for FV we would use the > normal serial, e.g. console=ttyS0,115200n8 > > Here's the breakdown of all the cases (again this is for PV guests) > > 1) With _NO_ console= params we only get early boot messages to the console, > and then nothing else, not even a login prompt. The VNC gets all console > output, including shutdown messages and of course a vterm login. > > 2) With console=hvc0 we get a full console (all boot messages and a login). VNC > _only_ gets a vterm login. All shutdown and other console messages go to the > console (hvc0). > > 3) With 'console=tty0 console=hvc0' we get the same as (2), but we also get > boot messages to the VNC. VNC doesn't get anything else, but boot messages are > nice to have there, so I see this as an improvement. I don't get shutdown message from VNC with (3). Is it expected? Is there a way to get both boot and shutdown message from both console and VNC? > At the time I wrote this bug we only got (1) after a normal installation, so > VNC had to be used until the kernel command line was manually modified. I don't > know the state of this now since I've been adding console=hvc0 to my kickstarts > for months. We should recheck it.
(In reply to comment #8) > > 3) With 'console=tty0 console=hvc0' we get the same as (2), but we also get > > boot messages to the VNC. VNC doesn't get anything else, but boot messages are > > nice to have there, so I see this as an improvement. > > I don't get shutdown message from VNC with (3). Is it expected? Is there a way > to get both boot and shutdown message from both console and VNC? > This is what I mean when I say we get boot messages to VNC, but nothing else. So no, you can't get shutdown messages or any other messages to VNC while the guest is running. This is because the last console= parameter on the kernel command line is one with control after booting. If you reverse the order then you'll get shutdown messages in VNC, but the console will only show boot messages and not work for anything else. If this is a problem, then a different bug should be opened to the kernel to investigate it.
virtinst has been merged into virt-manager.git. Moving all virtinst bugs to the virt-manager component.
Modern Fedora uses systemd, which is smart enough to start a tty on hvc0 if it exists, so virtio console and xenconsole work out of the box for logging in at least. That more or less 'fixes' this without having to test this change on a bunch of older OS, deal with the fact that it only works for certain install methods, etc.