Ignore:
Timestamp:
Jun 10, 2009, 5:47:04 PM (15 years ago)
Author:
broder
Message:

In invirt-remote:

  • If a particular VM is being autoinstalled, include that in the invirt-listvms output.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/host/usr/sbin/invirt-listvms

    r2245 r2351  
    3333    data['start_time'] = float(xsc.read('', '%s/start_time' % data['vm']))
    3434    data['uptime'] = time.time()-data['start_time']
    35     # CD, if there is one
     35    # CD or autoinstall, if we're using either
    3636    vbds = xsc.ls('', '/local/domain/%d/device/vbd' % domid)
    3737    for vbd in vbds:
    3838        dev = '/local/domain/%d/device/vbd/%s' % (domid, vbd)
    39         if xsc.read('', '%s/device-type' % dev) == 'cdrom':
    40             data['cdrom'] = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
     39        dev_type = xsc.read('', '%s/device-type' % dev)
     40        dev_params = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
     41        if dev_type == 'cdrom':
     42            data['cdrom'] = dev_params
     43        elif dev_type == 'disk' and dev_params == '/dev/xenvg/s_install_hda':
     44            data['autoinstall'] = True
    4145   
    4246    return name, data
Note: See TracChangeset for help on using the changeset viewer.