Add a safety check to the janitor to make sure we only delete old_ LV.
[invirt/packages/invirt-remote.git] / host / usr / sbin / invirt-listvms
index 0f9d5dc..d71d6eb 100755 (executable)
@@ -32,12 +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, if there is one
+    # 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)
-        if xsc.read('', '%s/device-type' % dev) == 'cdrom':
-            data['cdrom'] = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
+        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