[Openstack] [XenAPI] Implementing text console (log)

Mohammed Naser mnaser at vexxhost.com
Fri May 25 00:52:21 UTC 2012


Hello,

I am currently doing work on adding the text logs / console output
into XenServer, a feature that has not been implemented:

https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L1345

At the moment, I have a sort-of working concept of it that only runs
under XS6 (the only one that offers VT100 terminals), however it has a
fallback to returning nothing if it doesn't find one, however, there
is an issue.

The way to get the console output is by getting the console URL and
CONNECT-ing to it, an example of this in a curl is the following:

curl -k -X CONNECT
'https://192.168.1.215/console?uuid=6e12b329-6d72-19a4-f8ea-61dedcd049b9&session_id=OpaqueRef:d04043d3-4328-c1b6-1a2a-4a3638419967'

The curl process will appear to be hanging, but if you run any
commands or type anything, you'll see it appear in the screen.
Obviously, you need your own session_id and console UUID with type
VT100.

The potential resolution I can see for this is simply having a process
that CONNECT-s to consoles when any VM starts and just keeps storing
it in a file and we can read that file at any given points, however,
I'm not sure if we can create this type of architecture in Nova (or if
we can start background threads, etc).  Also, it would need to handle
any reboots (as a new console will be generated) and re-connect to it.
 This should not be hard to handle as it only requires a restart when
the connection is dropped.

I'm not sure to as what the best way to approach this at the moment so
I would like the input of the OpenStack XenAPI community so we can get
this silly-sounding feature to output proper output instead of fake
data.

Regards,
Mohammed

-- 
Mohammed Naser — vexxhost




More information about the Openstack mailing list