I have a Xen host system based on Debian Squeeze, and installed xen-tools. I would like to setup a CentOS domU using xen-create-image
. xen-tools already 'knows' of CentOS-5, but I cannot seem to get xen-create-image
working correctly. I have trouble finding out the necessary parameters I need to pass to xen-create-image
(especially mirror?). And, of course, it would be nicer to use CentOS-6.
So, how do I create a CentOS-6 (or 5) domU on a Debian Squeeze dom0 (both x86_64), preferably using xen-create-image
?
This took a while to trudge through and shouldn't die in my notes. This is for Debian 6/Squeeze, xen4 on amd64 hardware.
/etc/rinse/centos-5.packages
and add the following items (probably alpha sorted, but I haven't played around with this):authconfig
chkconfig
libuser
passwd
python-libs
xen-create-image --hostname=foo.example.com --ip=1.2.3.4 --gateway=1.2.3.1 --netmask=255.255.255.0 --install-method=rinse --dist=centos-5 --mirror=http://mirror.centos.org/centos/5/os/x86_64/CentOS/ --arch=i386
---arch=i386
is required,x86_64
is a non-starter for some reason.--install-method=rinse
is required.--mirror
flag is required.mkdir -m 0700 /tmp/img_mnt
mount -o loop /home/xen/images/domains/foo.example.com/disk.img /tmp/img_mnt
chroot
(1) to the new jail:chroot /tmp/img_mnt /bin/bash
chkconfig iscsi off
chkconfig iscsid off
chkconfig rsyslogd on
- Recommended for debuggingpwconv
passwd root
chroot
(1)`ed environment:exit
unmount
(1) the loopback image:umount /tmp/img_tmp
xm create -c foo.example.com.cfg