Debootstrap Intrepid Server PV DomU at Xen 3.3.1 CentOS 5.2 Dom0 (all 64-bit)

As appears debootstrap RPM developed for Fedora 9 works fine at Xen 3.3.1 CentOS 5.2 Dom0 and provide an option to create Intrepid Server PV Guest via debootstrapped Ubuntu’s image in RH’s Xen Dom0 environment. Install F9’s rpm then debootstrap would understand non Ubuntu Environment:-

# rpm -ivh debootstrap-1.0.8-1.fc9.noarch.rpm

Prepare LVMs for install:-

# lvcreate -n ubuntu -L12G /dev/vgxen
# lvcreate -n ubuntu-swap -L4G /dev/vgxen
# mke2fs -j /dev/vgxen/ubuntu
# mkswap /dev/vgxen/ubuntu-swap
# mkdir -p /mnt/xen
# mount /dev/vgxen/ubuntu /mnt/xen

Create missing symlink:-

# ln -s /usr/share/debootstrap/scripts/gutsy \

Update on 01/09/2008
Fedora 10’s debootstrap-1.0.10-1.fc10.noarch.rpm has this symlink already created. Moreover debootstrap-1.0.10-1.fc10.noarch.rpm been installed on Xen 3.3.1 openSUSE 11.1 Dom0 provide comletely functional debootstrap utility to create Intrepid Server, Hardy Heron PV DomUs at openSUSE 11.1 Dom0 in the same way as described bellow.

Deboostrap new Intrepid Guest:-

# debootstrap --arch=amd64 \
--include=linux-image-server,grub \
--components=main,universe,multiverse intrepid \

Once that has finished chroot into the new debootstrapped tree :-

# chroot /mnt/xen
# export LANG=C

Create /etc/fstab:

# cat /etc/fstab
/dev/xvda1 / ext3 defaults 0 1
/dev/xvdb1 none swap defaults 0 0
proc /proc proc defaults 0 0

Create a folder for GRUB menu and update the config

# mkdir -p /boot/grub
# update-grub

Edit /boot/grub/menu.lst
– add “console=hvc0” to both kernel lines (normal and recovery mode)
Setup a getty on the Xen console (hvc0):

# cd /etc/event.d
# cp tty1 hvc0
# sed -i -e "s/tty1/xvc0/g" hvc0

Remove references to the hardware clock; these will cause the DomU to hang:

# update-rc.d -f hwclockfirst remove
# update-rc.d -f hwclock remove
# rm /etc/udev/rules.d/85-hwclock.rules

Configure network interfaces (/etc/network/interfaces):-

# cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

Create /etc/hosts file

# cat /etc/hosts localhost IntrepidPVH

Create /etc/hostname file

# cat /etc/hostname

Exit chroot and unmount the filesystem.

# exit
# umount /mnt/xen

Start DomU via profile:-

bootloader = '/usr/bin/pygrub'
memory = 2048
name = "ubuntuPV"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:/dev/vgxen/ubuntu,xvda1,w', 'phy:/dev/vgxen/ubuntu-swap,xvdb1,w' ]

At this point i had to bring /etc/apt/sources.list from remote Intrepid Server installed on bare metal.

# apt-get update

Run tasksel at DomU to install Basic Ubuntu Server and OpenSSHserver. Rebooted DomU:-

# apt-get upgrade

1.CentOS 5.1 x86_64, Xen, and how to create a stinkin’ Ubuntu DomU

6 Responses to Debootstrap Intrepid Server PV DomU at Xen 3.3.1 CentOS 5.2 Dom0 (all 64-bit)

  1. Dan says:

    I am also doing a similar setup but run into a problem when I try to chroot in the env.

    chroot /vserver/vm_base
    chroot: cannot run command `/bin/bash’: No such file or directory

    any ideas?

  2. behappy says:

    maybe your dom0 is 32 bits, but you want to chroot into a 64 bits os, that’s don’t work

  3. misterco says:

    Thanks for this post, I try to install a Debian on Fedora distribution, on OVH server…

  4. macduke says:

    Thanks for the post… but i run in a problem i get no login i can only login with ssh or in recovery mode.
    i think i did the console stuff right but maybe u have a tip for me.😉

  5. dbaxps says:

    I believe problem is here:-

    Edit /boot/grub/menu.lst
    – add “console=hvc0″ to both kernel lines (normal and recovery mode)
    Setup a getty on the Xen console (hvc0):

    # cd /etc/event.d
    # cp tty1 hvc0
    # sed -i -e “s/tty1/xvc0/g” hvc0

  6. YAA Adding this to my bookmarks. Thank You

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 31 other followers

%d bloggers like this: