Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
You could try rinse (rinse - RPM installation environment) – Todd Deshane Jan 10 '12 at 3:21
up vote 2 down vote accepted

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 --ip= --gateway= --netmask= --install-method=rinse --dist=centos-5 --mirror= --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/ /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
  12. Login.
share|improve this answer
for Debian you use need to use arch=amd64 not arch=x86_64 even if your deploying a centos domU. – Rob Sep 18 '15 at 0:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.