Howto setup a Xen user domain using debootstrap
Most commonly people use the xen-tools package for creating virtual servers for Xen in Debian and Ubuntu. My major complaint with xen-tools is that the virtual servers are created with 1 file per partition rather than 1 file per disk. Using 1 file per disk allows users controlling the domains to resize their partitions if they wish to do so and is far more compatible with other virtualization solutions. For these reasons I have standardized on 1 file per disk. It is still possible, and perhaps preferable, to use xen-tools and then simply convert the file after the creation process. However I set out to avoid using xen-tools and came up with this method. I’m not sure if I will continue to use it as xen-tools handles a lot of setup tasks that this does not but it is a good method to be aware of in making the decision about what process is best.
dd if=/dev/zero of=superhost.img bs=1M count=4Kxm block-attach 0 tap:aio:/xen-hosts/superhost.img /dev/xvda wcfdisk /dev/xvdamkfs.ext3 /dev/xvda1mount /dev/xvda1 /mnt/xvda1/debootstrap --include=grub,nano,linux-image-xen,nano,puppet,ssh --components=main,universe hardy /mnt/xvda1- installation problems can sometimes be fixed at this point by running
chroot /mnt/xvda1and usingapt-get.
- installation problems can sometimes be fixed at this point by running
umount /mnt/xvda1xm block-list 0- To get the vdev id
xm block-detach 0 51712- edit xen cfg file
- bootup virtual machine and setup networking, hosts, etc




Recent comments
1 week 4 days ago
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 2 days ago
2 weeks 4 days ago
2 weeks 6 days ago
5 weeks 3 days ago
5 weeks 3 days ago
5 weeks 3 days ago
5 weeks 5 days ago