[libvirt-users] host to VM serial device configuration

John Paul Walters jwalters at isi.edu
Wed Jan 19 01:33:00 UTC 2011

On Tue, 2011-01-18 at 04:13 -0600, Igor Serebryany wrote:
> Hey John, 
> 	If I understand correctly, you are trying to get access to the
> 	character device after you've created the domain. The exact device
> 	is auto-assigned when the VM is created, but you can get the correct
> 	device from the domain XML after the domain is running.
> 	I use 'type=pty' in my domain definition XML. I then extract the
> 	device that was assigned to the domain using the following bit of
> 	python:
> 	import xml.etree.cElementTree as etree
> 	xml = etree.fromstring(myDomainObject.XMLDesc(0))
> 	tty = xml.find('devices').find('console').attrib['tty']
> 	Hope this helps!
> --Igor

Thanks Igor, that works perfectly.


More information about the libvirt-users mailing list