+ codepath = 'hvm'
+else:
+ codepath = 'paravm'
+
+if 'mirror' in locals(): #Installer
+ disk.append('phy:/dev/xenvg/s_install_hda,hdb,r')
+
+ kernel = '/boot/vmlinuz-2.6.24-19-xen' #From hardy
+ ramdisk = '/boot/initrd.img-2.6.24-19-xen'
+
+ if not machine.nics:
+ raise RuntimeError('You must have a nic to autoinstall')
+ n = machine.nics[0]
+ extra = 'ro noresume'
+ extra += (' ip=%s::%s:%s:%s:eth0:off'
+ % (n.ip, config.dhcp.gateway, config.dhcp.netmask, machine.name))
+ extra += ' mirror=%s dist=%s' % (mirror, dist)
+ extra += ' imagesize=%s' % imagesize
+ if 'noinstall' in locals():
+ extra += ' noinstall'
+ root = '/dev/hdb1'
+ codepath = None
+elif cdrom is not None:
+ disk.append('phy:/etc/xenvg/image_' + cdrom.cdrom_id + ',hdc:cdrom,r')
+ boot = 'd'
+ codepath = 'hvm'
+
+if codepath == 'hvm':