I've just got it running on Ubuntu, have installed everything but the kitchen sink.

Got virt-console, virt-manager, running debian Squeeze, everything works.

But... I don't want to connect via vnc. I want to install loads of KVM's onto a headless server. And I don't want to deal with firewalling vnc.

But I can't figure out the correct way to enable serial tty access, I would ideally like for every guest machine there would be a corresponding tty on the host.

I can't figure out what I should connect getty to in the guest. Running lshw doesn't reveal any serial devices. Grub 2 doesn't make it particularly easy to figure out where to add the kernel console setting to the initrd

The guest machine has the following pty config.

<serial type='pty'>
   <target port='0'/>

in RHEL/Fedora I add console=ttyS0 to the grub kernel boot line in grub.conf

Then make sure the VM xml definitions have

<serial type='pty'>  
 <target port='0'/> 
<console type='pty'>  
 <target type='serial' port='0'/> 

Start the VM and run virsh list to get it's name or number

Then simply run virsh console $VMNAME

I think this should work in Debian as well

  • Simple when you know how ;-)
    – Bryan Hunt
    Jul 31 '12 at 13:52
  • I googled it up when I was writing a set of scripts to access a RHEV/oVirt guest serial console :)
    – dyasny
    Jul 31 '12 at 14:13
  • On debian it's /etc/default/grub - that's why I couldn't find it. As if grub2 isn't convoluted enough already, they have to add their own little tweak to it's structure.
    – Bryan Hunt
    Aug 1 '12 at 9:57
  • Then run - sudo update-grub2
    – Bryan Hunt
    Aug 1 '12 at 10:01
  • I also uncommented - GRUB_TERMINAL=console
    – Bryan Hunt
    Aug 1 '12 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.