www.xen123.cn_在Xen上设置Ubuntu DomU:在Fedora Xen Dom0上安装Ubuntu 10.10

www.xen123.cn

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.

本文介绍了在Fedora Xen Dom0之上设置Ubuntu 10.10 DomU。 设置Ubuntu 10.10 DomU的过程与使用Fedora设置稳定的Xen DomU的过程相同:在Xenified Fedora 12 Dom0和Xen 4.0之上的未修改Fedora 12这篇文章仅显示特定于Ubuntu的区别,与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.

我们假定已经为该DomU设置了一个虚拟硬盘(xvda),无论是文件支持还是LVM支持 。 在此示例中,我们以LVM支持的xvda为例。

Ubuntu安装媒体 (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:

不幸的是,被广泛使用的Ubuntu 10.10 Live CD无法在Xen上启动。 我们使用Ubuntu的netboot iso 映像来安装Ubuntu。 可以从以下位置获取Ubuntu 10.10的iso映像:

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:

该文件是mini.iso。 可以通过wget直接下载:

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

创建Xen DomU配置文件 (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:

然后,我们为此Ubuntu Xen DomU创建一个配置文件。 请注意,在此我们对上述文件地址(磁盘)和网络接口(vif)做出一些假设。 ubuntu-install.run文件的内容:

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'

启动Ubuntu Xen DomU并开始安装 (Start Ubuntu Xen DomU and start installation)

We can start the DomU now by:

我们现在可以通过以下方式启动 DomU:

# 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.

命令行安装界面将会出现。 我们可以按照向导一步一步地安装Ubuntu 10.10。

启动DomU (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.

启动Ubuntu DomU类似于启动Fedora DomU 。 切记要从配置文件中的“磁盘”中将虚拟cdrom远程。

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.

由于pygrub不能很好地支持Ubuntu 10.10,因此我们将内核和ramdisk从Ubuntu的/ boot /目录复制到Dom0的目录,并从Dom0的目录提供DomU内核和ramdisk。 另请注意,Ubuntu需要“ root = UUID =…”内核参数。 也可以从DomU磁盘中的/root/grub/grub.cfg获取此UUID。 我们可以简单地将DomU的磁盘安装到Dom0并获取文件和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.

最后,享受它! 有关Xen的更多信息,请参见Xen Solutions

翻译自: https://www.systutorials.com/setting-up-ubuntu-domu-on-xen-use-ubuntu-10-10-on-fedora-xen-dom0/

www.xen123.cn

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值