Bug 1016788 - Have virt-install automatically add console=hvc0 to kernel command line when using "--graphics none"
Have virt-install automatically add console=hvc0 to kernel command line when ...
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: virt-manager (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Cole Robinson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-08 13:02 EDT by Dusty Mabe
Modified: 2014-02-02 15:34 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-02 15:34:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dusty Mabe 2013-10-08 13:02:00 EDT
Description:
When running virt-install with "--graphics none" virt-install will connect you to the serial console of the guest. In F20 this is hvc0 rather than ttyS0 so when I was passing in either nothing or console=ttyS0 to the cmdline it wasn't working. It would be nice if virt-install could detect what console option is the proper one to use for the Guest/OS we are installing and add an appropriate console=XXXX option for the situation.

Here is the command I was using to install:

virt-install --name nest2 --ram  2048 --disk /guests/nest2.img,size=10,bus=scsi --controller=scsi,model=virtio-scsi --accelerate --location http://dl.fedoraproject.org/pub/fedora/linux/development/20/x86_64/os/ --extra-args "ks=http://192.168.133.1:8000/kickstart.ks cmdline" --graphics none --os-variant fedora20


Version-Release number of selected component (if applicable):
F20 alpha:
virt-manager-0.10.0-4.git79196cdf.fc20.noarch
libvirt-client-1.1.3-2.fc20.x86_64
kernel-3.11.3-301.fc20.x86_64
qemu-kvm-1.6.0-9.fc20.x86_64

Steps to Reproduce:
1. virt-install with "--graphics none" and notice you don't get any output 


Actual results:
No output.

Additional info:
This was a nested virt setup F19(L0) F20(L1) F20(L2). Problem observed when running virt-manager on L1 guest and attempting to add graphics to L2 guest.
Comment 1 Daniel Berrange 2013-10-09 05:15:47 EDT
IIUC, you shouldn't need todo this.  If no graphics card is present, systemd is supposed to be automatically running a agetty on any text console that is present. So if that's not working, I think we might have a systemd unit file bug.
Comment 2 Dusty Mabe 2013-10-09 08:02:12 EDT
Yep. The systemd agetty part works just fine. I talked about this with Cole yesterday in the #fedora-test-day chat. What is desired here are the kernel/init/anaconda install messages to be sent to the serial device during install. 

A later discussion revealed that kernel arguments can only be appended in cases where we directly pass the kernel into qemu so that may be a limitation of this "feature" if we decide to implement it. Or we could engineer some way to somehow pass in kernel args even if we don't know which kernel is going to be run at the time of startup (this would probably take some qemu/kernel work and is off topic from this discussion).
Comment 3 Cole Robinson 2014-02-02 15:34:12 EST
Rather than trying to hack up the command line, which we might get in wrong in rare cases, I just added a bunch of stdout/stderr warnings if the graphics + console + extra-args combo doesn't look right.

Note You need to log in before you can comment on or make changes to this bug.