Installing Debian Squeeze (6.0) domU On CentOS 5.5 x86_64 dom0

Want to support HowtoForge? Become a subscriber!
 
Submitted by vilkaspilkas (Contact Author) (Forums) on Tue, 2011-03-22 10:41. :: CentOS | Debian | Linux | Xen

Installing Debian Squeeze (6.0) domU On CentOS 5.5 x86_64 dom0

This tutorial shows how to create a Debian Squeeze (6.0) domU on dom0 running CentOS 5.5 x86_64.

 

1 Problem description

When installing Debian 6.0 domU on CentOS 5.5 x86_64 the following problems may arise:

  • Debian 6.0 uses Grub 2 and Xen 3.1.2 (default version on CentOS 5.5) will not be able to boot newly installed system using pygrub.
  • When following official Debian documentation, the installed system may use wrong architecture and may not have Xen images installed at all.

 

2 Installation

The following command is used to launch the installation:

xm create -c /etc/xen/xm-debian.cfg install=true \
  install-mirror=ftp://ftp.us.debian.org/debian \
  install-installer=ftp://ftp.us.debian.org/debian/dists/squeeze/main/installer-amd64/20110106+b1/images

It will look for images in subdirectory netboot/xen. This directory also contains file xm-debian.cfg. Download this file and adjust disk, vif and other sections to suit your needs. This file is already filled with correct values for release (squeeze) and architecture (amd64). The file can also be adjusted to use preferred mirror.

 

3 Post installation

After the system is installed and the domU is shut down, check if Xen kernel images have been installed and install them if necessary. After the images have been installed, copy them to /boot directory on dom0 and modify the Xen config to use custom kernel and ramdisk instead of pygrub.

kpartx -av /dev/data_vg/myvm-root
mount /dev/mapper/myvm-root1 /mnt
chroot /mnt
apt-get install linux-image-2.6.32-5-xen-amd64
exit
cp /mnt/boot/*xen* /boot
kpartx -d /dev/data_vg/myvm-root

Installing the xen kernel will generate the initrd image appropriate for domU.

The example Xen config:

    name = "myvm"
    maxmem = 1024
    memory = 1024
    vcpus = 1
    kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64"
    root = "/dev/xvda1 ro"
    ramdisk = "/boot/initrd.img-2.6.32-5-xen-amd64"
    on_poweroff = "destroy"
    on_reboot = "restart"
    on_crash = "restart"
    disk = [ "phy:/dev/data_vg/myvm-root,xvda,w",
             "phy:/dev/data_vg/myvm-swap,xvdb,w"]
  

 

4 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Tue, 2011-06-07 10:03.

how does your xm-debian.conf look like ?

i think we manually need to create or download it ?

 

Zeeshan

Submitted by Bryan (not registered) on Mon, 2011-08-08 05:51.
Uh, like the author describes, the xm-debian.org file is on the FTP site in the netboot/xen directory.
Submitted by Anonymous (not registered) on Sat, 2011-07-23 14:18.
Is it possible or not to install a vps windows machine under this configuration? I've seen a lot of websites discussing this and providing guides but i still can't figure out out to successfully install windows vps on a setup like this.