---
title: "Installing a Debian Lenny DomU under a CentOS 5 Dom0"
id: "90"
type: "post"
slug: "installing-debian-lenny-domu-under-centos-5-dom0"
published_at: "2010-08-23T20:12:33+00:00"
modified_at: "2010-08-23T20:27:53+00:00"
url: "https://ismay.ca/2010/08/installing-debian-lenny-domu-under-centos-5-dom0/"
markdown_url: "https://ismay.ca/2010/08/installing-debian-lenny-domu-under-centos-5-dom0.md"
excerpt: "I spent some time recently trying to figure out how to go about installing Debian Lenny as a Xen domU (guest) virtual machine on a CentOS 5.5 dom0. I found Andy’s article on the process, but had trouble getting it..."
taxonomy_category:
  - "Linux"
taxonomy_post_tag:
  - "Linux Xen Debian CentOS servers sysadmin"
---

You are here: [Home](https://ismay.ca/)
/[Linux](https://ismay.ca/category/linux/)
/ Installing a Debian Lenny DomU under a CentOS 5 Dom0

I spent some time recently trying to figure out how to go about installing Debian Lenny as a Xen domU (guest) virtual machine on a CentOS 5.5 dom0. I found [Andy’s article](http://www.andybotting.com/wordpress/running-a-debian-lenny-domu-under-a-centos-5-dom0)
 on the process, but had trouble getting it to work. I also found another article by Tom on how to [i](http://blog.penumbra.be/2010/02/xen-libvirt-debian-lenny/)
[nstall Xen and libvirt on Debian Lenny](http://blog.penumbra.be/2010/02/xen-libvirt-debian-lenny/)
. If you skip down to the section “On to installing a virtual machine!”, we see how to install debian with the virt-install command.

> Once this is done we can install our first virtual machine:
> 
>  ```
> # virt-install \
> --name=test-debian-install \
> --ram=1024 \
> --file-size=10 \
> --nographics \
> --paravirt \
> --file=/var/lib/xen/images/test-debian-install.img \
> --location=http://ftp.belnet.be/debian/dists/lenny/main/\
> installer-i386
> ```

As it turns out, this command works out of the box on CentOS as well! You do need to install the libvirt package first, of course, but after that it just works. As a handy tip, the –location parameter can be set to your favorite debian mirror. I used [http://ftp.ca.debian.org/debian/dists/lenny/main/installer-i386/](http://ftp.ca.debian.org/debian/dists/lenny/main/installer-i386/)
, and that works just as well.

I prefer to [use logical volumes](http://www.linux4beginners.info/node/xen-LVM-PVM-install)
 instead of disk image files for my servers. Just create a new logical volume and change the –file parameter like this:

```
# lvcreate -L20G -n xenvm00 VolGroup00
# virt-install \
--name=test-debian-install2 \
--ram=1024 \
--file-size=10 \
--nographics \
--paravirt \
--file=/dev/VolGroup00/xenvm00 \
--location=http://ftp.ca.debian.org/debian/dists/lenny/main/\
installer-i386
```

Using the above instructions greatly simplifies the process of installing Debian Lenny as a Xen Guest under CentOS 5.5. Once the virt-install command completes, you will be presented with the standard Debian installer, and everything will proceed normally from there.
