|

Setting Up Ubuntu DomU on Xen: Ubuntu 10.10 on Fedora Xen Dom0

Setting up Ubuntu 10.10 DomU on top of Fedora Xen Dom0 is introduced in this post. The process of setting up Ubuntu 10.10 DomU is the same as Setting Up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0 This post only show the difference which is specific to Ubuntu and different from Fedora.

We assume one virtual hard disk (xvda) for this DomU is already set up no matter it is file backed or LVM backed. In this example, we use a LVM backed xvda as the example.

Ubuntu installation media

Unfortunately, the Ubuntu 10.10 Live CD, which is widely used, can’t boot on Xen. We use Ubuntu’s netboot iso image to install Ubuntu. The iso image for Ubuntu 10.10 can be retrieved from:

http://archive.ubuntu.com/ubuntu/dists/maverick/main/installer-amd64/current/images/netboot/

The file is mini.iso. It can be directly downloaded by wget:

$ wget http://archive.ubuntu.com/ubuntu/dists/maverick/main/installer-amd64/current/images/netboot/mini.iso

Create Xen DomU configuration file

Then we create a configuration file for this Ubuntu Xen DomU. Please be aware that we make some assumption as aforementioned file address (the disk) and network interface (the vif) here. The ubuntu-install.run file’s content:

name="10.1.1.228"
vcpus=2
memory=2048
vif=['bridge=eth2']
disk = ['file:/home/xen/mini.iso,xvdc:cdrom,r', 'phy:vg_xen/vm-10.1.1.228,xvda,w']
bootloader="/usr/bin/pygrub"
on_reboot='restart'
on_crash='restart'

Start Ubuntu Xen DomU and start installation

We can start the DomU now by:

# xm create -c ./ubuntu-install.run

The command line installation interface will appear. We can install Ubuntu 10.10 step by step just following the wizard.

Start DomU

To start the Ubuntu DomU is similar to start the Fedora DomU. Remember to remote the virtual cdrom from “disk” in the configuration file.

As pygrub doesn’t support Ubuntu 10.10 well, we copy the kernel and ramdisk out from Ubuntu’s /boot/ directory to Dom0’s directory and provide DomU the kernel and ramdisk from Dom0’s directory. Please also be aware that Ubuntu requires the ‘root=UUID=…’ kernel parameter. This UUID can also be got from /root/grub/grub.cfg in DomU’s disk. We can simply mount DomU’s disk to Dom0 and get the files and UUID.

This is the configuration file that works well in our cluster:

name="10.1.1.228"
vcpus=2
memory=1024
vif=['bridge=eth2']

kernel="/home/xen/vm-10.1.1.228/vmlinuz-2.6.35-28-generic"
ramdisk="/home/xen/vm-10.1.1.228/initrd.img-2.6.35-28-generic"
extra='root=UUID=4412ceeb-2c40-452f-82e2-8ddbaca681a9'

disk = ['phy:vg_xen/vm-10.1.1.228,xvda,w']
on_reboot='restart'
on_crash='restart'

Last, enjoy it! More posts on Xen is in Xen Solutions.

Similar Posts

  • Setting Up Standalone (Local) Hadoop

    Hadoop is designed to run on [[hadoop-installation-tutorial|hundreds to thousands of computers]] inside cluster. However, Hadoop is configured to run things in a non-distributed mode as a single Java process by default. This is specially useful for debugging since distributed debugging is really a nightmare. This post introduces how to set up a standalone Hadoop environment….

  • MFC程序使用系统风格界面

    VC6默认编译出来的程序在XP下Luma风格下运行也是Windows的经典界面, 有损界面的美观与统一. VC2008默认设置下如果不是使用的unicode也是如此. 本文给出使VC6和VC2008可以编译出使用系统界面风格的解决方案. 1. 使VC6编译出使用系统风格的程序 步骤如下: 1) 创建一个.manifest文件的资源. 在res/文件夹下创建一个跟以程序名加.manifest的文件, 如果程序为test.exe, 则创建test.exe.manifest 文件可由此下载: https://www.systutorials.com/t/g/programming/resultcollector.manifest/ 注意要使用utf-8编码保存。 2) 将新定义的资源加入到.rc2文件中, 类型设为24. 打开res/文件夹下的.rc2文件, 在其中加入如下定义: 1 24 MOVEABLE PURE “res/test.exe.manifest” 其中的文件地址按1)步中修改的设置即可. 之后编译即可, 为了使程序界面可能充分利用系统的界面特性, 可以将界面字体设置为TrueType类型的, 利用Windows XP等系统的屏幕字体平滑特性. 2. 使VC2008编译出使用系统风格的程序 在VC2008下就比较简单了, 如果程序字符集使用unicode则默认就是使用系统界面风格的, 如果选择其它的类型, 则编辑下stdafx.h即可. 最后面部分找到这么一段: #ifdef _UNICODE #if defined _M_IX86 #pragma comment(linker,”/manifestdependency:”type=’win32′ name=’Microsoft.Windows.Common-Controls’ version=’6.0.0.0′ processorArchitecture=’x86′ publicKeyToken=’6595b64144ccf1df’ language=’*'””) #elif defined _M_IA64 #pragma comment(linker,”/manifestdependency:”type=’win32’…

3 Comments

  1. I, successfully, installed and configured Ubuntu Maverick as DomU on CentOS v5.4. But, I am unable to boot and run this guest. When I execute the command:

    xm create -c GUEST

    I get the following error message:

    ValueError: invalid literal for int(): msdos1
    No handlers could be found for logger “xend”
    Error: Boot loader didn’t return any data!

    Any help is greatly appreciated.

    1. Would you mind posting your configuration and version of Xen here?

      One point that should be concern is that, in the post, Ubuntu DomU uses kernel from Dom0’s disk rather than it’s disk:

      kernel=”/lhome/xen/vm-10.1.1.228/vmlinuz-2.6.35-28-generic”
      ramdisk=”/lhome/xen/vm-10.1.1.228/initrd.img-2.6.35-28-generic”
      extra=’root=UUID=4412ceeb-2c40-452f-82e2-8ddbaca681a9′

      and does not use this:

      # bootloader = “/usr/bin/pygrub”

      The pygrub doesn’t work with Ubuntu 10.10 on Xen 3.4.3.

Leave a Reply

Your email address will not be published. Required fields are marked *