分享

转发:在Ubuntu11.10上安装Xen 4.0

 waders 2011-12-04

Setup your cloud server in 3 minutes with Xen 4.1 on Ubuntu 11.10

Ubuntu support xen officially since 11.10. It is really easy to install the packages. Although some issues should be fixed manually, it is a painless experience. Here’s the steps to setup your cloud server in 3 minutes with Xen 4.1 on Ubuntu 11.10.


1. Install xen hypervisor and utilities
sudo apt-get install xen-hypervisor-4.1-amd64 xen-utils-4.1 xenwatch xen-tools xen-utils-common xenstore-utils

sudo apt-get install virtinst virt-viewer virt-manager

2. Restart os, choose the xen kernel, verify xen installation
# xm info
# brctl show

3. Config your xend 
$ sudo vim /etc/xen/xend-config.sxp

comment out (xend-unix-server yes) at the file, that means make sure the following line exists or been added :
(xend-unix-server yes)

#vi ~/.bashrc , add the following line:

export VIRSH_DEFAULT_CONNECT_URI="xen:///"

4. Restart, choose the xen kernel, and verify libvirt

# virsh version

Compiled against library: libvir 0.8.3
Using library: libvir 0.8.3
Using API: Xen 3.0.1
Running hypervisor: Xen 4.0.0

Conguratulations, all packages installed successfully.

5. Run virtual machine manager to manage your vms.

# virt-manager

Then you will see the screen virtual machine manager screen:

virtual machine manager for xen 4.1 in ubuntu 11.10

virtual machine manager for xen 4.1 in ubuntu 11.10

Create virtual machine in virt-manager,

error occur when finish creation, and show something like:
if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
….
/usr/lib64/xen/bin/qemu-dm: ….

that means qemu-dm could not be found, try to fix it:

#mkdir /usr/lib64/xen -p
#cp /usr/lib/xen-4.1/* -r /usr/lib64/xen/

then continue to finish creation of the virtual machine, still error occured, and show something like:
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err …
or something like this:

libvirtError: POST操作失败: xend_post:来自 xen 守护进程的错误:<Fault 3: ”>

check the error log,  it will give you some clues:
# less /var/log/xen/xend.log

the log shows error occured and logged at /var/log/xen/qemu-dm-demo.log, check it:
# less /var/log/xen/qemu-dm-demo.log

it says /usr/share/qemu/keymaps/en-us could not be found, the keymaps really does not exist in my disk.
and find it at /usr/share by :
#ls /usr/share/qemu (and press Tab, it shows qemu-linaro exist)

so just copy it to fix:
#cp -r /usr/share/qemu-linaro/ /usr/share/qemu

then continue to finish the vm creation. Wow, it works!

virutal machine running at ubuntu 11.10 with xen 4.1

virutal machine running at ubuntu 11.10 with xen 4.1





Digg This
Reddit This
Stumble Now!
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
This entry was posted in cloudlinuxvirtualization. Bookmark the permalink.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多