From: Greg Price Date: Tue, 13 Nov 2007 10:10:10 +0000 (-0500) Subject: Prototype fast installer using a special guest. X-Git-Tag: sipb-xen-database/10.3~3 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/commitdiff_plain/1d2313f85d8f35e6cf6ad019d0f411066d491c59?ds=sidebyside;hp=a0c92a1e797ab2835921564f36e787ea05274051 Prototype fast installer using a special guest. Rather than poke directly in the boot sector, partition table, etc, which caused so much pain last week (r231), we just dd the entire disk. Then we poke at the bits that need to change (like secrets, the hostname, the root password, the filesystem uuids). Since this poking is distribution-dependent, we want it to be supplied by the image, so to make that safe we run it in a VM. The plan is 1. source image is dd'd (in the host) to the target image 2. special copying-installer image is booted, with access to target and to a small image containing its arguments 3. copying-installer guest reads arguments, mounts target, runs a script with a well-known name in target, passing arguments. Bits I haven't done yet include - frob grub config in the copying-installer image so it boots with init = the copying-installer script (doing this manually for testing) - install script into copying-installer, or into my example image, in a sane automated way (they're checked into partial/ here) - all the tasks the image's script ought to actually carry out - make this all available from remctl and the web pages. svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=245 --- diff --git a/client/etc/xen/sipb-database b/client/etc/xen/sipb-database index 723eb78..fa75ebc 100644 --- a/client/etc/xen/sipb-database +++ b/client/etc/xen/sipb-database @@ -72,7 +72,11 @@ if 'installer' in locals(): + installer_options.split(' ')) disk.append('file:'+tmptree+'/install.iso,hdc:cdrom,r') boot = 'd' - + +elif 'disks' in locals(): # for the copying installer's use + disk = disks.split(' ') + boot = 'c' + 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')