data['vm'] = xsc.read('', '/local/domain/%d/vm' % domid)
data['start_time'] = float(xsc.read('', '%s/start_time' % data['vm']))
data['uptime'] = time.time()-data['start_time']
+ # CD, if there is one
+ vbds = xsc.ls('', '/local/domain/%d/device/vbd' % domid)
+ for vbd in vbds:
+ dev = '/local/domain/%d/device/vbd/%s' % (domid, vbd)
+ if xsc.read('', '%s/device-type' % dev) == 'cdrom':
+ data['cdrom'] = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
return name, data