X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/8fa7103160f7a8e6663f88be13cb7a40e3032764..f864eadcc01ce5683683b6b57c25785ace7a848c:/host/usr/sbin/invirt-listvms diff --git a/host/usr/sbin/invirt-listvms b/host/usr/sbin/invirt-listvms index c16a883..d71d6eb 100755 --- a/host/usr/sbin/invirt-listvms +++ b/host/usr/sbin/invirt-listvms @@ -32,6 +32,16 @@ def get_dom(domid): 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 or autoinstall, if we're using either + vbds = xsc.ls('', '/local/domain/%d/device/vbd' % domid) + for vbd in vbds: + dev = '/local/domain/%d/device/vbd/%s' % (domid, vbd) + dev_type = xsc.read('', '%s/device-type' % dev) + dev_params = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev)) + if dev_type == 'cdrom': + data['cdrom'] = dev_params + elif dev_type == 'disk' and dev_params == '/dev/xenvg/s_install_hda': + data['autoinstall'] = True return name, data