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?

  • 1
    You could try rinse (rinse - RPM installation environment) Jan 10, 2012 at 3:21

1 Answer 1


This took a while to trudge through and shouldn't die in my notes. This is for Debian 6/Squeeze, xen4 on amd64 hardware.

  1. Edit /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
  2. Create the base image: xen-create-image --hostname=foo.example.com --ip= --gateway= --netmask= --install-method=rinse --dist=centos-5 --mirror=http://mirror.centos.org/centos/5/os/x86_64/CentOS/ --arch=i386
    • The ---arch=i386 is required, x86_64 is a non-starter for some reason.
    • Passing --install-method=rinse is required.
    • I'm not sure that the --mirror flag is required.
  3. Create a temp dir to mount the image: mkdir -m 0700 /tmp/img_mnt
  4. Mount the image: mount -o loop /home/xen/images/domains/foo.example.com/disk.img /tmp/img_mnt
  5. chroot(1) to the new jail: chroot /tmp/img_mnt /bin/bash
  6. Enable/disable services:
    1. chkconfig iscsi off
    2. chkconfig iscsid off
    3. chkconfig rsyslogd on - Recommended for debugging
  7. Setup/convert to shadow passwords: pwconv
  8. Change the root password: passwd root
  9. Exit the chroot(1)`ed environment: exit
  10. unmount(1) the loopback image: umount /tmp/img_tmp
  11. Start the VM: xm create -c foo.example.com.cfg
  12. Login.
  • for Debian you use need to use arch=amd64 not arch=x86_64 even if your deploying a centos domU.
    – Rob
    Sep 18, 2015 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .