|

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 make Ubuntu Linux boot to text mode?

    My Ubuntu boots to GUI mode by default. How to make Ubuntu Linux boot to text mode? If you are using Ubuntu older than 16 such as Ubuntu 14.04: Edit /etc/default/grub Change GRUB_CMDLINE_LINUX=… to GRUB_CMDLINE_LINUX=”text”. Backup your old grub config`$ sudo cp -n /etc/default/grub /etc/default/grub.bak-date +%s ` Update grub$ sudo update-grub If you are using…

  • |

    Resource Acquisition Is Initialization (RAII) in C++ with Detailed Examples

    In this post, we will discuss Resource Acquisition Is Initialization (RAII), a programming idiom in C++ that helps manage resources such as memory, file handles, and network connections. By leveraging constructors, destructors, and scope-bound resource management, RAII enables the creation of more reliable and maintainable C++ code. RAII can not only achieve mostly what a…

  • Chinese Charactor Configuration on Fedora 11

    最新的更新版本请看: Fedora 中文字体设置. 使用Linux时我个人倾向使用英文环境系统,而Fedora11在英文环境下中文字体有时会不太好看,经常遇到需要字体优化美化的问题。 以下是我的配置方案,经测试效果还算不错,解决了Fedora 11 中文字体难看的问题: 方案1:使用uming和ukai字体,即AR PL UMing CN等。 关键是使用的字体包如下: 首先要安装这两个字体: cjkuni-ukai-fonts cjkuni-uming-fonts 然后配置一下~/.fonts.conf文件. 使sans-serif serif monospace字体中文使用uming/ukai即可. 我的.fonts.conf文件可以从这里下载(两种选择, 我喜欢前者): https://github.com/zma/config_files 使用Liberation和uming/ukai字体: .fonts.cofn.liberation 使用dejavu和uming/ukai字体: .fonts.conf.dejavu 下载后放到自己的$HOME下改名为.fonts.conf就可以了。 使用uming字体效果如下(请放大后看效果): 方案2:安装文泉驿字体,这个非常简单,安装相应包即可了。 如果喜欢其它的字体选择性的安装上就可以了,只要注意只安装自己需要的就行了。有人使用微软雅黑字体,首先这是侵权的,其次开源的字体做得其实已经很不错了。 最后将字体平滑选项打开, KDE和gnome都有相关设置方法。 以上内容只是针对使用xft字体系统的设置。对于使用核心字体系统的X程序来说字体依然会出现很丑的情况。 下面是针对emacs的设置方法: 首先需要安装这个字体包: xorg-x11-fonts-misc 注意到在中文系统下emacs的中文显示非常好,而在英文环境中去非常差,我们可以利用这一点,在运行emacs前首先将系统环境设为中文即可。 在~/bin/下建立一文件ema 内容如下: #!/bin/bash rm -f ~/.emacs ln -s ~/.emacs.x ~/.emacs LANG=zh_CN.UTF-8 emacs –fullheight -r $* 然后加入执行权限即可: chmod +x…

  • Conferences on Cloud Computing 2012

    This post lists important conferences on Cloud Computing in year 2012. OSDI 2012 10th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’12) October 8–10, 2012, Hollywood, CA “The tenth OSDI seeks to present innovative, exciting research in computer systems. OSDI brings together professionals from academic and industrial backgrounds in what has become a…

  • | |

    How to iterate all dirs and files in a dir in C++?

    How to iterate all dirs and files in a dir in C++? To open a dir, we can use opendir() to open a directory stream. DIR *opendir(const char *name); Then we can use readdir() to iterate the directory stream. struct dirent *readdir(DIR *dirp); Here is an example C++ program using these 2 library functions. #include…

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 *