[Xen] install xen 10.04 and dom0 on Ubuntu 4.1x86

Source: Internet
Author: User
Tags ocaml

After a day of hard work, xen 4.1 and dom0 have been successfully installed. This article mainly introduces how to install xen 10.04 and dom0 on Ubuntu 4.1 x86, dom0 is divided into source code installation and Deb package installation.

 

For the installation process, refer to the article "xen 4.1 on Ubuntu 10.04 64bit" and the realse notes of xen 4.0.

First install xen

1. Install Dependencies

sudo apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools
transfig tgif texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra 
texlive-fonts-recommended pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python 
python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev 
e2fslibs-dev git-core uuid-dev ocaml ocaml-findlib libx11-dev bison flex  xz-utils  gcc-multilib 
liblzma-dev lzma lzma-dev python-lzma -Vy

2. Download the source code, decompress it, and enter the source code directory.

3. Compile

Make xen

Make tools

Make stubdom

4. Installation

SudoMake install-xen

SudoMake install-tools python_prefix_arg =

SudoMake install-stubdom

As a result, there is no problem in compiling and installing xen. Just follow the instructions in one step...

 

Next install dom0, first install the source code

1. Clone the source code and enter the Directory

git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xencd linux-2.6-xen

(Here and the reference document is somewhat different, git clone Linux kernel to view the Branch has been in the xen/stable-2.6.32.x state, so do not need to reset head and checkout, directly compile it.

 

2. Generate the. config file, compile and install the kernel

Here I selected the 2.6.32.27 configuration file provided in the xenparavirtops article and went to the kernel directory to execute the following command

Make oldconfig

Make menuconfig (if you need to change something)

Make bzimage

Make modules

Sudo make modules_install

 

Sudo CP-A. config/boot/config-version

Sudo CP-a system. MAP/boot/system. Map-version

Sudo CP-a ARCH/x86/boot/bzimage/boot/vmlinuz-version

sudo update-initramfs -c -k 2.6.32.40
3. Update grub
Sudo gedit/etc/grub. c/40_custom, add the following content
menuentry "Xen 4.1 with pv_ops dom0 2.6.32.40" {insmod ext2set root='(hd0,1)'search --no-floppy --fs-uuid --set 17051bcf-3d83-422d-bede-b559db7095b6multiboot /boot/xen.gzmodule /boot/vmlinuz-2.6.32.40 root=UUID=17051bcf-3d83-422d-bede-b559db7095b6 ro quiet splashmodule /boot/initrd.img-2.6.32.40}
Save, update grub. cfg, restart, and the problem arises again...
The error "Mount: mounting none on/dev failed: no such device" appears during startup", But it went smoothly. put it aside for the moment.

Enter the system. Xen 4.1 has started to use the XL tool to manage virtual machines. The operations are as follows:
sudo /etc/init.d/xencommons start
sudo xl list

 

Name                                        ID   Mem VCPUs      State   Time(s) 
Domain-0                                     0  3583     4     r-----    336.0 

Next we will introduce how to install dom0 using packages.
You need to go to the Debian official website to downloadLinux-image-2.6.32-5-xen-686 and Linux-base (> = 2.6.32-31) Two Deb packages. This is the minimum dependency.
After dpkg is installed, the/boot directory and/lib/modules/directory contain the corresponding startup items and modules, and then update grub in/etc/grub. d/40_csutom:
menuentry "Xen 4.1 with Debian 6 kernel 2.6.32-5" {insmod ext2set root='(hd0,1)'search --no-floppy --fs-uuid --set 17051bcf-3d83-422d-bede-b559db7095b6multiboot /boot/xen.gzmodule /boot/vmlinuz-2.6.32-5-xen-686 root=UUID=17051bcf-3d83-422d-bede-b559db7095b6 ro quiet splashmodule /boot/initrd.img-2.6.32-5-xen-686}

Update grub, restart, and enter the system. Everything goes well. Start xencommons and the following error occurs: "Starting xenstored... fatal: failed to open evtchn device: no such file or directory ", the original Debian package compiled xen-evtchn into a module, so you need to first load xen-evtchn

Sudo modprobe xen-evtchn

XL can be used again, and this package is much smaller than the kernel compiled by itself. It is about 70 m and more than 500 m is compiled by myself. The display effect is no different from that of bare metal, however, all the fonts edited by myself have changed...

It is found that update-grub cannot be used in this kernel. If you don't know why, study it slowly ..

 

Next, start PV and install VNC to start hvm...

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.