creation of Openfiler IMG

However, here's what finally worked for me.


1. Create a large empty file.
dd if=/dev/zero of=/export/filer.img seek=1G count=1

2. Make a file system in the file. The OF installation requires it to be labelled 'root'. You'll need to answer a prompt about creating a filesystem in a file to get this to work.
mke2fs -j -L root filer.img

2.5 Make a swapfile
dd if=/dev/zero of=/export/filer.swap seek=100M count=1
mkswap /export/filer.swap

3. Mount the new filesystem loopback
mount -o loop filer.img /mnt

4. Untar the OF distribution into the mountpoint.
cd /mnt &&  tar xvzf openfiler-2.3-x86_64.tar.gz

5. unmount
cd / && umount /mnt

6. Create a Xen config file : /etc/xen/filer. This one is for a Centos 5.2 host system so you might need to change the KERNEL to one that exists on your system.
name = "filer"
uuid = "926403f1-3026-8490-fa11-11f5f704d869"
maxmem = 2048
memory = 256
vcpus = 1
kernel="/boot/vmlinuz-2.6.18-92.1.6.el5xen"
root ="/dev/xvda1 ro"
bootloader="/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
disk = [ "tap:aio:/export/domains/filer.img,xvda1,w", "tap:aio:/export/domains/filer.swap,xvda2,w" ]
vif = [ "mac=00:16:3e:6c:d5:0e,bridge=virbr0" ]


7. Start the domain.
xm create filer