| jwboyer ( @ 2009-07-02 14:55:00 |
| Entry tags: | fedora |
virt-manager and guest serial console
So maybe this is already well known, but I always have a heck of a time getting a serial console to one of my KVM guests managed by virt-manager. I don't know why this is, but I do. The UI doesn't seem to present an interface for it, and the hardware wizard doesn't present an option for adding a serial port to the guest hardware. So I sat down and figured out how to get it working today, at least with F11.
Most of my guests have a serial port configured in the guest.xml file already. Whether I added this long ago, or virt-install creates it, I can't tell. If your guests don't have this, the syntax seems to be:
<serial type='pty'>
<target port='0'/>
</serial>
I opened up the guest details GUI in virt-manager, went to the serial port entry and saw that Serial 0 was directed to /dev/pts/10. I started the guest up, edited the kernel command line boot parameters to include 'console=ttyS0', and booted.
Then I did what I would do normally for any real machine hooked up to a serial port and fired up the tried and true 'minicom' like this: sudo minicom -p /dev/pts/10
Amazingly enough, there was the serial output. A few quick configuration changes later, and I could even login to the guest via that.
This may be really really simple. Some of you may even be laughing that I bothered to write this up. I don't care. My googling skills either suck, or this isn't very widely known. If nothing else, I wrote it up so I could remind my tiny brain how I did it before. Maybe someone else will find it helpful too.