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.
best,
JP