How to install Xen in Ubuntu 12.04

Source: Internet
Author: User

I encountered many strange problems during the installation of xen in Ubuntu 12.04. As there are few online materials, I hope to provide them for your reference and avoid detours.

The first is the basic installation process, which is roughly the same as that on the Internet. Refer

1. Install the required software packages for compiling Xen and Linux xen kernel:

Sudo

Apt-get install build-essential binutils python-dev libncurses5-dev libcurl4-openssl-dev xorg-dev uuid-dev bridge-utils bison flex udev gettext bin86 bcc iasl libgcrypt11-dev libssl-dev pciutils libglib2.0-dev gcc-multilib texinfo zlib1g-dev
$ Sudo apt-get install gcc g ++ make patch libssl-dev bzip2 gettext \

Zlib1g-dev python libncurses5-dev libjpeg62-dev libx11-dev \

Libgcrypt11-dev pkg-config bridge-utils bcc bin86 libpci-dev \

Libsdl-dev python-dev texinfo libc6-dev uuid-dev bison flex fakeroot \

Build-essential crash kexec-tools makedumpfile libncurses5 \

Libncurses5-dev iasl gawk

Some of the above software packages are repeated. If they are repeated, they will be skipped and will not be installed. Before installing the software package, be sure to select the source. Both 163 and cn. archive are supported.

Step 2: Install xen vmm

The differences between 32-bit and 64-bit systems are also important. To enable pae for a 64-bit ubuntu server, you must run the following command:

Sudo apt-get install linux-image-server

Sudo apt-get install xen-hypervisor-4.1-i386 xen-utils-4.1 xenwatch xen-tools xen-utils-common xenstore-utils

Here the xen-hypervisor-4.1 is divided into 32-bit, 64-bit system with xen-hypervisor-4.1-amd64, 32-bit with xen-hypervisor-4.1-i386.


Step 3: Install libvirt and Virtual Manager

Sudo apt-get install stronginst python-libvirt virt-viewer virt-manager

Step 4: restart the machine, select the kernel with xen to start, enter the system, and then check whether Xen has been successfully installed:

$ Sudo xm list

At this point, I encountered a problem, that is, when linux is restarted, grub startup options will not appear, resulting in input of xm list

Can't find hypervisor info

The answer provided on the Internet is generally as follows:

# Mv/etc/grub. d/10_linux/etc/grub. d/50_linux
# Update-grub2

I have referred to a foreign website.

# Mv/etc/grub. d/10_linux/etc/grub. d/20_linux & mv/etc/grub. d/20_linux_xen/etc/grub. d/10_linux_xen

The basic meaning is in grub. d. The files in the folder are started at a lower level than the linux Startup sequence (for example, 10, therefore, the basic meaning of the two methods is to advance 20_linux_xen (10_linux will be placed later), so they are both valid.

But you may still have problems.

Can't find hypervisor info

It's not an online error, but you should pay attention to grub2. This 2 indicates that grub2 is used for startup. Maybe your computer is grub for startup. This is why your change failed. I checked the information and said that grub did not boot the xen kernel core, and so on. Upgrading from grub to grub2 is not difficult.

The configuration file of grub2 is/boot/grub. cfg. According to this file (grub. Cfg) You can change grub_default = 0 in the/etc/default/grub file (convert 0 to the number corresponding to xen ). It cannot be changed in real time. grub. cfg does not provide a number for each startup item, so once you change the default value, your computer may have a blue screen...

After the modification, observe grub. The starting sequence of the cfg is 20 _ xen in advance.

Reboot is OK.

Recommended reading:

How does XenServer add local storage?

Enable and configure the SNMP service for Citrix XenServer

Install XS-Tools (XenServer) in CentOS/Linux)

XenServer Tutorial: How to Implement hot migration

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.