Google Plus

install XEN in Centos 5.4

Written by Mel Kham on . Posted in Linux tutorials

Xen (pronounced /zɛn/) is a virtual-machine monitor for x86, x86-64, Itanium and PowerPC 970 architectures. It allows several guest operating systems to execute on the same computer hardware concurrently. The University of Cambridge Computer Laboratory developed the first versions of Xen; as of 2010 the Xen community develops and maintains Xen as free software, licensed under the GNU General Public License (GPL2).

[update]

Xen systems have a structure with the Xen hypervisor as the lowest and most privileged layer.[1] Above this layer come one or more guest operating systems, which the hypervisor schedules across the physical CPUs. The first guest operating system, called in Xen terminology “domain 0″ (dom0), boots automatically when the hypervisor boots and receives special management privileges and direct access to all physical hardware by default. The system administrator can log into dom0 in order to manage any further guest operating systems, called “domain U” (domU) in Xen terminology. (source Wikipedia)

Lets create partitions where to save virtual machines , for example


[pirat9@localhost ~]$ sudo mkdir /vmw
Password:
[pirat9@localhost ~]$


boot etc lib lost+found mnt proc sbin srv tmp var
[root@unixmen ~]#

The Selinux Configutaion shouldm be disabled . shoudl be like:


[root@unixmen ~]# more /etc/selinux/config

# 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=disabled
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted

when you disable your Selinux please reboot your machine with



#yum install kernel-xen xen

#reboot

after reboot check if the XEN kernel is started

with

Password:
[pirat9@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

check if Xen is started with

[root@localhost ~]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 5613 4 r—– 308.4
[root@localhost ~]#

now we have to start installing virtual machines


install from the host http :

-n = name of vbox

-r ram in MB

-f the file image

-s size of the disk

-l install source host (http pr ftp)


[root@localhost ~]# virt-install -n vmx -r 256 -f /vmw/vmx.img -s 4 -l http://mirrors.nl.kernel.org/centos/5.4/os/x86_64/

Starting install…
Retrieving file vmlinuz… | 1.9 MB 00:04
Retrieving file initrd.img… | 7.1 MB 00:13
Creating storage file… | 4.0 GB 00:00
Creating domain… | 0 B 00:01

the installation will connect directly to the console to complete the installation








Verry fine. now some useful commands to use to manage your Vm machines

Login under  root   with

[pirat9@localhost ~]$ su -
Password:

check xm commandswith


[root@localhost ~]# xm help

 


how to join your vm machines listed

[root@localhost pirat9]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 4818 4 r—– 2839.7
vmz 4 665 1 -b—- 16.8

 

 


Now join the VMZ domain  from terminal




[root@localhost pirat9]# xm console vmz
Bootdata ok (command line is ro root=/dev/VolGroup00/LogVol00)

CentOS release 5.4 (Final)
Kernel 2.6.18-164.el5xen on an x86_64

localhost.localdomain login:

Now  you can login to vmz  machine. and  good  luck 

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .