+ 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::18.181.0.1:255.255.0.0:%s:eth0:off' % (n.ip, 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_image' in locals():
+ check(re.match('^[A-Za-z0-9][A-Za-z0-9_.-]*$', cdrom_image))
+ disk.append('file:/srv/images/' + cdrom_image + '.iso,hdc:cdrom,r')
+ boot = 'd'
+ codepath = 'hvm'
+
+if codepath == 'hvm':
+ ioemu = "ioemu:"
+ viftype = "type=ioemu, "