Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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'/>
</serial>
share|improve this question
add comment

1 Answer

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'/> 
</serial>  
<console type='pty'>  
 <target type='serial' port='0'/> 
</console>

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

share|improve this answer
    
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
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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