|

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

  • How to use iPhone to browse blocked websites in mainland China?

    How to use iPhone to browse blocked websites in mainland China? FYI: on iPhone, these 2 Apps are the favorite combination I am using for visiting blocked websites in mainland China: Check OpenVPN + Ovpn Spider: Free VPNs for iPhone Users for how to use them together. OpenVPN is for setting up OpenVPN VPN connection….

  • SetProxy: 一个设置IE代理的命令行小工具

    IE的代理设置用起来并不方便,我自己而言就要经常更改代理服务器,相信很多人有跟我相同的需要。使用C++编写了一个小程序SetProxy调用Win32 API来设置代理服务器IP,用起来方便多了。 编译后为一个可运行console程序,将它放在\windows\system32目录下,使用时只要运行 SetProxy IP:port 就可以把IP设置好,如果要关闭代理,只需运行 SetProxy “” 命令行中运行,界面较土,但用着方便。可以考虑设置几个快捷方式在桌面或者工具栏,点击即设置代理,其它方式发挥想象。 程序下载地址. 源代码也放在这里,希望有需要的人可以用得上 ;) 源代码下载地址. 这是一份有些年头的代码, 如果你在较新的编译器下编译这个项目, 请先做[[setproxy-一个设置ie代理的小工具#comment-995|这里所述的小修改]]. — Eric on Apr. 9, 2014. Read more: Making Emacs Start Up Faster Profiling Vim to Find Out Which Plugin Makes Vim Slow Handling Sparse Files on Linux Spring Shell Technology For Java development Vim Tutorial for Beginners: vimtutor…

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 *