Custom Search

Wednesday, May 9, 2012

how to install xen on CentOS 6

Installation of Xen on Centos 6 working


1)
# yum install bridge-utils

2)
# yum install http://au1.mirror.crc.id.au/repo/kernel-xen-release-6-3.noarch.rpm

3)
# yum install kernel-xen xen

4)
# vim vim /etc/grub.conf

4a) Before Edit

default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32.57-1.el6xen.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32.57-1.el6xen.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32.57-1.el6xen.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.el6.x86_64.img

4b) After Edit

default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32.57-1.el6xen.x86_64)
        root (hd0,4)
        kernel /boot/xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
        module /boot/vmlinuz-2.6.32.57-1.el6xen.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        module /boot/initramfs-2.6.32.57-1.el6xen.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=12a3774f-45a5-4b9c-b08b-dad9b0654c2e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /boot/initramfs-2.6.32-220.el6.x86_64.img

5)
vim /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


6)
Reboot into your new Xen kernel



7)
[root@localhost ~]# xm info

host                   : localhost.localdomain
release                : 2.6.32.57-1.el6xen.x86_64
version                : #1 SMP Tue Mar 20 10:23:34 EST 2012
machine                : x86_64
nr_cpus                : 2
nr_nodes               : 1
cores_per_socket       : 2
threads_per_core       : 1
cpu_mhz                : 2933
hw_caps                : bfebfbff:20100800:00000000:00000940:0008e3bd:00000000:00000001:00000000
virt_caps              :
total_memory           : 2009
free_memory            : 961
free_cpus              : 0
xen_major              : 4
xen_minor              : 1
xen_extra              : .2
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
xen_commandline        : dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
cc_compiler            : gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
cc_compile_by          : mockbuild
cc_compile_domain      : crc.id.au
cc_compile_date        : Mon Feb 20 12:52:37 EST 2012
xend_config_format     : 4
[root@localhost ~]#


8)
[root@localhost ~]# ls /proc/xen/
capabilities  privcmd  xenbus  xsd_kva  xsd_port
[root@localhost ~]#

1 comment: