Following noogie's howto 
(http://opensolaris.org/jive/thread.jspa?threadID=62436), I thought I'd share 
my approach to this problem.

Most of this procedure is intended to be a paste-bomb.  I'm working on amd64, 
some details will need to change for other architectures.

Install and start Apache so that we can pretend to be an Ubuntu mirror 
(optional, but it's faster this way):

pkg install SUNWapch22
svccfg -v import /var/svc/manifest/network/http-apache22.xml
svcadm enable svc:/network/http:apache22


Grab the Ubuntu server alternate (.1) CD for this architecture, mount it up and 
link it into the Apache Docroot:

mkdir -p /export/isoimages
cd /export/isoimages
wget http://mirrors.gigenet.com/ubuntu/hardy/ubuntu-8.04.1-server-amd64.iso
iso="/export/isoimages/ubuntu-8.04.1-server-amd64.iso"
dev=`lofiadm -a $iso`
dir=`echo $iso | sed 's/\.iso$//'`
mkdir -p $dir
mount -Fhsfs $dev $dir
ln -s $dir/ubuntu /var/apache2/2.2/htdocs/


Grab a xen-ified kernel from xensource:

mkdir -p /xen/ubuntu /xen/temp
cd /xen/temp
wget 
http://bits.xensource.com/oss-xen/release/3.1.0/bin.tgz/xen-3.1.0-install-x86_64.tgz
gzcat xen-3.1.0-install-x86_64.tgz | gtar xvf - 
dist/install/boot/vmlinuz-2.6.18-xen
cp dist/install/boot/vmlinuz-2.6.18-xen /xen/ubuntu/


Now we need the Hardy (Ubuntu 8.04) initrd.img for network installation:

cd /xen/ubuntu
wget 
http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz


Create the disk image to be used by Ubuntu:

/opt/csw/bin/qemu-img create /xen/ubuntu/ubuntu.img 5G


Finally, create the VM config file:

cat > ubuntu-install.cfg << EOF
kernel = "/xen/ubuntu/vmlinuz-2.6.18-xen"
ramdisk = "/xen/ubuntu/initrd.gz"
name = "ubuntu-install"
memory = "512"
disk = [ 'file:/xen/ubuntu/ubuntu.img,hda,w', ]
vif = [ 'mac=00:16:3e:11:11:11' ]
EOF
--
This message posted from opensolaris.org
_______________________________________________
xen-discuss mailing list
[email protected]

Reply via email to