HyperV和vmware在虚拟机中安装xen总结

1. Hyper-V

    在hyper-v中安装了ubuntu13.04,运行很好,使用起来的效果感觉比vmware要舒服。安装变异xen的内核也没有问题,可以正常的安装,update-grub之后也可以在grub启动项中发现带有xen内核的ubuntu启动选项,但是在启动之后无法进入系统,总是提示alert! /dev/disk/by-uuid/########### does not exist ,后来根据

http://blog.csdn.net/luohsh1/article/details/8657921   

这篇文章里面介绍的方法来设置,重新启动之后提示 ALERT! /dev/sda1 does not exist. Dropping to a shell!  后面实在是不知道该怎么去处理了,只好放弃。后面上网稍微看了看hyper-v的架构,和xen十分类似,不知道是不是这个原因导致的。

如果有人看到这个地方,知道怎么回事的话请告知。

2. VmWare

    在vmware中安装ubuntu13.04后,安装xen正常编译运行,安装方法如下:

Install dependencies

sudo apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif

sudo apt-get install texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial

sudo apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev (we dont need libjpeg62-dev since libjpeg8-dev is already installed)

sudo apt-get install iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml ocaml-findlib libx11-dev bison flex xz-utils libyajl-dev

sudo apt-get install gettext

sudo apt-get install libpixman-1-dev

sudo apt-get install gcc-multilib

get xen4.3 source from http://www.xenproject.org/downloads/xen-archives/supported-xen-43-series/xen-430.html if your UI doesn't work well, use 'wget' or something else to download it

if using Chinese, these are to be added. It is recommended that you use English at the very beginning.

sudo export LC_ALL=C

sudo export LANG=C

once you have downloaded the source code, unzip it to some directory, for example "/home/yourname/myxenfile", then 'cd' to this directory and do the following

sudo ./configure --libdir=/usr/lib (setting the lib path while configuring. otherwise you may get the "*.so file not found" issue)

sudo make dist

sudo make install

sudo update-grub

sudo update-rc.d xencommons defaults 19 18

sudo update-rc.d xend defaults 20 21

sudo update-rc.d xendomains defaults 21 20

sudo update-rc.d xen-watchdog defaults 22 23

sudo reboot

choose xen kernel at the grub menu when booting

sudo xl list

if everything goes OK, you'll see dom0 is running

if your ubuntu is running within vmware, you may find the grub menu missing and can not choose xen kernel.

you can press the "Shift" button during the restart process, then you will see the grub menu. i.e., is your xen kernel the 1st(rank=0), 2nd(rank=1) or 3rd(rank=2) in the menu list? I guess most people will have rank=2 just as I do

sudo vi /etc/default/grub

you open this file and see GRUB_DEFAULT=0. Change it until it looks as GRUB_DEFAULT=2

sudo update-grub

OK, we have set your default boot to xen kernel. reboot and use 'sudo xl list' to see what happens

Tips: backup your vm before modifying grub if you are in vmware!!!

原文地址:https://www.cnblogs.com/liuyikang/p/3878058.html