Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install xen 4. 2. 0 using yum under CentOS.

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install xen 4.2 with yum under CentOS." interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to install xen 4.2 using yum under CentOS." Come on!

1. Download kernel-xen repo image

The code is as follows:

Wget http://us3.mirror.crc.id.au/el6/x86_64/kernel-xen-release-6-4.noarch.rpm

Rpm-ivh kernel-xen-release-6-4.noarch.rpm

2 install xen kernel and its related software

The code is as follows:

Yum install-y xen kernel-xen xen-libs python-virtinst bridge-utils

Reboot

3. Recompile the libvirtrpm package because libvirt in CentOS 6 removes support for xen

The code is as follows:

Mkdir-p / root/src/

Cd/root/src

Wget ftp://ftp.redhat.com/pub/redhat/Linux/enterprise/6Server/en/os/SRPMS/libvirt-0.8.1-27.el6.src.rpm

Rpm-I libvirt-0.8.1-27.el6.src.rpm

Wget http://pasik.reaktio.net/xen/patches/libvirt-spec-rhel6-enable-xen.patch

Cd/root/rpmbuild/SPECS

Cp-a libvirt.spec libvirt.spec.orig

Patch-p0 < ~ / src/libvirt-spec-rhel6-enable-xen.patch

Yum installebtables libcgroup lzop iscsi-initiator-utils lvm2 dnsmasq xen-devel nfs-utils libnl-devel xhtml1-dtds libudev-devel libpciaccess-devel yajl-devel libpcap-devel avahi-devel parted-devel device-mapper-devel numactl-devel netcf-devel python-devel autoconf automake libtool libxml2-devel readline-devel ncurses-devel gnutls-devel cyrus-sasl-devel libcap-ng-devel libcurl-devel

Rpmbuild-bb libvirt.spec

/ root/rpmbuild/RPMS/x86_64

Rpm-Uvh-force libvirt-0.8.1-27.el6.x86_64.rpm libvirt-client-0.8.1-27.el6.x86_64.rpm libvirt-python-0.8.1-27.el6.x86_64.rpm

4. Configure the network card for bridging mode

For example:

The code is as follows:

Cd/etc/sysconfig/network-scripts/

Cp-an ifcfg-eth0 ifcfg-br0

The content of ifcfg-br0 is

DEVICE= "br0"

BOOTPROTO= "none"

HWADDR= "6C:92:BF:00:40:CA"

NM_CONTROLLED= "yes"

IPADDR=172.19.10.21

ONBOOT= "yes"

Type= "Bridge"

NETMASK= "255.255.255.0"

# UUID= "a833937d-9306-44d3-a011-b941d4c4dd7b"

The ifcfg-eth0 is modified as follows

Restart the network card after modification

The code is as follows:

Service network restart

5. Last modified / boot/grub/grub.conf

The code is as follows:

Grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a / boot partition. This means that

# all kernel and initrd paths are relative to / boot/, eg.

# root (hd0,0)

# kernel / vmlinuz-version ro root=/dev/sda8

# initrd / initrd- [generic-] version.img

# boot=/dev/sda

Default=0

Timeout=5

Splashimage= (hd0,0) / grub/splash.xpm.gz

Hiddenmenu

Title CentOS (3.6.7-1.el6xen.x86_64)

Root (hd0,0)

Kernel / xen-4.2.gz dom0_mem=4096M

Module / vmlinuz-3.6.7-1.el6xen.x86_64 ro root=UUID=1b782dd8-0693-4336-b3b3-512f8f1ed548 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet

Module / initramfs-3.6.7-1.el6xen.x86_64.img

Title CentOS (2.6.32-279.14.1.el6.x86_64)

Root (hd0,0)

Kernel / vmlinuz-2.6.32-279.14.1.el6.x86_64 ro root=UUID=1b782dd8-0693-4336-b3b3-512f8f1ed548 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet

Initrd / initramfs-2.6.32-279.14.1.el6.x86_64.img

Title CentOS (2.6.32-279.el6.x86_64)

Root (hd0,0)

Kernel / vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=1b782dd8-0693-4336-b3b3-512f8f1ed548 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet

Initrd / initramfs-2.6.32-279.el6.x86_64.img

6. Restart linux

At this point, I believe you are interested in "how to install xen 4. 2. 0 using yum under CentOS." With a deeper understanding, you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report