jwboyer ([info]jwboyer) wrote,
@ 2009-07-02 14:55:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
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.




(2 comments) - (Post a new comment)


[info]katzj
2009-07-02 07:43 pm UTC (link)
Take a look at ttywatch -- nicer than minicom for this sort of thing.

(Reply to this)

How 'bout a quick wiki article?
(Anonymous)
2009-07-05 08:24 am UTC (link)
Feel like turning this in to a quick wiki how-to article?

https://fedoraproject.org/wiki/Writing_how_to_documentation_on_the_wiki

I wrote that realizing it wasn't there, and turning a blog post in to a canonical document/article information node.

(Reply to this)


(2 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…