DTC-Xen Installation

DTC-Xen / Dom0 Howtos

DTC-Xen / DomU Howtos


DTC Howtos




Devel docs

Wiki - i18n

Wiki - Meta

CentOS setup of DTC-Xen

Any help, in the form of patch against the current Git, will be appreciated. We are also working on a Virtuozzo and KVM support. More on this very soon.

1. Installing CentOS

Install CentOS as usual, but do not forget that you need to run using an LVM volume group to host your VMs. Each of your VMs will be using a logical volume (LV) created from your dom0. Most of the LVM space must be left free, to be used by your VMs. It is greatly advised to use RAID1 (in software if you like), as hard drives do fail with time, especially with a lot of activity like when running a lot of VPS. In this case, you should create a RAID1 device for your / (root partition). 1GB should be enough. Then it is advised to use the following partitions, out of a volume group (LVM VG) created on top of a 2nd RAID1 device that will take most of the space of your hard drives:

   / 1GB
   /usr 6 GB
   /tmp 512 MB
   /var total amount of RAM + 4GB
   swap 512 MB

2. Installing Xen

Once your CentOS is setup, simply do:

   yum install kernel-xen xen

Then you have to edit your /etc/xen/xend-config.sxp to match the following:

   (network-script 'network-bridge antispoof=yes')
   (dom0-min-mem 512)

The rest of the parameters in the configuration file wont mater as much as the one above, so you can leave them with default value.

3. Rebooting under Xen

Edit your /etc/grub.conf so that the default is set to 0 (zero) which is, in most case, your Xen hypervisor and kernel. Edit also the Xen kernel line so it sets the dom0 memory footprint at boot time so it is as follow (kernel version number might change over time, so do not change it in your distribution):

   kernel /boot/xen.gz-2.6.18-128.2.1.el5 dom0_mem=512M

Then reboot.

4. Adding the rpmforge repository

First, we need to set up the RPMForge repository on your machine. At the time of writing this HOWTO, the latest RPMForge RPM release for CentOS 5.3 was:

You probably want to get the latest release so peruse the right package here. Make sure the name matches your architecture (x86_64 or i386) and base system (fc7, fc8, el4, el5). Simply wget the file, then run rpm -ivh on it.

5. Installing DTC-Xen

Before you can install the dtc-xen rpm, you need to add the GPLHost yum repository. Simply create a new file called /etc/yum.repo.d/gplhost.repo as follow:

name=GPLHost (architecture-specific)

name=GPLHost (architecture-independent)

Then simply type:

   yum install dtc-xen

6. Editing /etc/dtc-xen/dtc-xen.conf

You might want to edit provisioning_volgroup if you have more than one VG. Edit also the vps_mac_prefix, and the network parameters at the end of the file.

As the init ramdisk image of CentOS is quite bad (it doesn't work by default with scsi devices in the domU), you need to create a new one. Do this:

   mkinitrd -v --with=xenblk --omit-scsi-modules --omit-raid-modules /boot/my-initrd `uname -r`

Then edit INITRDPATH to match the new /boot/my-initrd you just created.

The rest of the parameters should be fine by default.

You can now start creating VMs using dtc_setup_vps_disk and dtc_reinstall_os. Both have man pages, and it's advised to read them. Then you shall build a first VM, install DTC on it, and connect it to your dom0 DTC-Xen. Do not install DTC in your dom0, it's a quite bad and dangerous setup.

7. Setting-up your authentification

You got to set a password in /etc/dtc-xen/htpasswd. To do this, simply do:

   cd /etc/dtc-xen && htpasswd htpasswd dtc-xen

then set the password that you have entered in the DTC web interface for this Xen server.

Page last modified on December 09, 2009, at 02:44 PM EST