Okay, this is actually pretty cool. You can provision a few distros pretty easily via Pygrub -- here's the relevant config (bootloader and disk line) that I've been using lately:
NOTE THAT THIS EXAMPLE IS ENTIRELY MADE UP! OpenSUSE 10.3 does not support this install method, as far as I can tell.
You can see that I'm defining two devices, one a CDROM and the other an ordinary Xen disk. Pygrub automatically mounts the ISO, pulls a kernel off of it, and boots normally -- and since the initrd tells it to go into install mode, that's what it does.
It even works with Solaris -- we just have to give the kernel and initrd explicitly:
Note the Solaris-style device numbers.
Obviously this won't work with distros that don't ship a Xen-aware kernel on their installation media, but that's it's a nice trick for those that do. (I think that's . (Apparently this is one of the standard ways of doing things now! I'm so excited!)
bootloader = 'pygrub'
disk = ['tap:aio:/opt/xen/opensuse-10.3.iso,xvdb:cdrom,r',]
'tap:aio:/opt/xen/domain.img,xvda,w'
NOTE THAT THIS EXAMPLE IS ENTIRELY MADE UP! OpenSUSE 10.3 does not support this install method, as far as I can tell.
You can see that I'm defining two devices, one a CDROM and the other an ordinary Xen disk. Pygrub automatically mounts the ISO, pulls a kernel off of it, and boots normally -- and since the initrd tells it to go into install mode, that's what it does.
It even works with Solaris -- we just have to give the kernel and initrd explicitly:
disk = ['tap:aio:/opt/xen/opensolaris-2008-05.iso,6:cdrom,r']
'tap:aio:/opt/xen/domain.img,0,w'
kernel = '/platform/i86xpv/kernel/unix'
ramdisk = 'boot/x86.microroot'
Note the Solaris-style device numbers.
Obviously this won't work with distros that don't ship a Xen-aware kernel on their installation media, but that's it's a nice trick for those that do. (I think that's . (Apparently this is one of the standard ways of doing things now! I'm so excited!)
Leave a comment