April 16, 2024, 01:14:24 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: XEN Virtualization in Linux  (Read 7007 times)

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
XEN Virtualization in Linux
« on: May 31, 2009, 01:12:59 PM »
Hi All,
I need to learn abt XEN virtualization. Do anyone have idea to configure/install it? I need to know how it works and its details.

Any help would be appriciated.

Ricky/Others Any idea?

Offline Puja

  • Linux Noob !
  • *
  • Posts: 9
Re: XEN Virtualization in Linux
« Reply #1 on: June 01, 2009, 09:27:17 AM »
Hi,

This is the procedure:

1.yum install xen
   yum install virt-manager

2.create a partition of atleast 1GB
Eg:we take partition created as sda7

3.vim /etc/xen/xmexample1
Now make following changes in configuration file

kernel="/boot/(Xen Kernel path)

You will get the kernel path from /boot i.e vmlinuz.xen2.1..copy the filename and paste it
memory=1024
name="xyz"
disk=['phy:sda7,sda7,w']
root="/dev/sda7 ro"

:wq

4.xm create xmexample1
xm list

5.service xend restart

reboot

Now do the following:
yum install virt-install

To check the details about virt-install
yum whatprovides virt-install

Real Time Virtualization
If virtualization is  to be done through command prompt:I have taken the file names as an eg,it will be different for your setup.Here we are installing a kickstart file already present in the server

virt-install -p --vnc --noautoconsole --name=abc --ram=256 --vcpus=1 --file/dev/sda7 --location=http://server1.example.com/pub --extra-args="ks=nfs:server1.example.com:/kickstart/small.cfg network noipv6"

or

If you want to install OS through CDROM using virtualization then:If anything is mounted already on the current partition,create a new partition.Because each time you want to add a new domain and install a OS,a new partition must be created


virt-install --vnc --noautoconsole --os-type='windows' --os-variant='vista'
--name=VISTA --ram=1024 --vcpus=1 --file=/dev/sda7 --location=/dev/dvd


After this is done go on Applications->System Tools->Virtual Machine Manager
You will see a new domain as abc.Open that domain and insert a CD for installation and the run.

Alternate methd through graphical method:
Applications->System Tools->Virtual Machine Manager
File->New Machine (specify all the details,it is similar to the one done through command prompt like partition no,RAM size,para virtualization or full virtualization etc)

With Regards,
Puja


Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: XEN Virtualization in Linux
« Reply #2 on: June 02, 2009, 03:01:06 AM »
Thanks Puja for your prompt reply

Would the following step create the new Guest i.e DOMU namesd "xmexample1"

1.yum install xen
   yum install virt-manager

2.create a partition of atleast 1GB
Eg:we take partition created as sda7

3.vim /etc/xen/xmexample1
Now make following changes in configuration file


kernel="/boot/(Xen Kernel path)

You will get the kernel path from /boot i.e vmlinuz.xen2.1..copy the filename and paste it
memory=1024
name="xyz"
disk=['phy:sda7,sda7,w']
root="/dev/sda7 ro"

4.xm create xmexample1
xm list

5.service xend restart

reboot


What about the below step i.e virt-install ? What does it mean? I am sorry but i m not clear what the need for this if  we have already created DOMU i.e  "xmexample1" in above step?
Appriciate if you please clear this doubt? I am dumb in XEN :(

Now do the following:
yum install virt-install

To check the details about virt-install
yum whatprovides virt-install

Real Time Virtualization
If virtualization is  to be done through command prompt:I have taken the file names as an eg,it will be different for your setup.Here we are installing a kickstart file already present in the server

virt-install -p --vnc --noautoconsole --name=abc --ram=256 --vcpus=1 --file/dev/sda7 --location=http://server1.example.com/pub --extra-args="ks=nfs:server1.example.com:/kickstart/small.cfg network noipv6"

or

If you want to install OS through CDROM using virtualization then:If anything is mounted already on the current partition,create a new partition.Because each time you want to add a new domain and install a OS,a new partition must be created


virt-install --vnc --noautoconsole --os-type='windows' --os-variant='vista'
--name=VISTA --ram=1024 --vcpus=1 --file=/dev/sda7 --location=/dev/dvd


After this is done go on Applications->System Tools->Virtual Machine Manager
You will see a new domain as abc.Open that domain and insert a CD for installation and the run.

Alternate methd through graphical method:
Applications->System Tools->Virtual Machine Manager
File->New Machine (specify all the details,it is similar to the one done through command prompt like partition no,RAM size,para virtualization or full virtualization etc)

Offline Puja

  • Linux Noob !
  • *
  • Posts: 9
Re: XEN Virtualization in Linux
« Reply #3 on: June 06, 2009, 02:52:59 PM »
Hi,

Please chcek the following concepts of virtualization.

Hypervisor:Hypervisor is a manager of Xen environment.It controls starting,stopping and pausing of virtualized OS.


Configuration files for Domain-U are located in /etc/xen directory of Domain-0.Each Domain-U tat runs in xen environment has its own config file.

So using vim /etc/xen/xmexample1 we can set up a Domain U known as xyz.
So when the system restarts through Xen envirnment a Domain-U is already created.

Now when you are already in Xen envirnmt n wish to create more Domain-Us then it can be done through command i.e:
virt-install -p --vnc --noautoconsole --name=abc --ram=256 --vcpus=1 --file/dev/sda7 --location=http://server1.example.com/pub --extra-args="ks=nfs:server1.example.com:/kickstart/small.cfg network noipv6"

or

through graphical way

Did you try these methods?


Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: XEN Virtualization in Linux
« Reply #4 on: June 07, 2009, 07:57:42 AM »
Thanks Puja, I never tried this. I have to configure it in prod boxes so need a downtime for all this related stuff. Will try and let you kow the status  :)

Anyways Thank you for helping me out. One thing more please let me know if you have any docs or pdf for the same? As i need to know the concept of virtualization like how it works in bridging mode (i.e using MAC not ipadress) and how it maps the NIC into various names like peth0,peth1 or veth0,veth1 .

SO appriciate if you also tell me the above details.., I have found some links through google but its not clear to me. DO you have any docs or any pdf/tutorials for it?

Thanks again.

Gaurav

Offline Puja

  • Linux Noob !
  • *
  • Posts: 9
Re: XEN Virtualization in Linux
« Reply #5 on: June 07, 2009, 05:26:24 PM »
Hi,

I guess you try with Redhat.com and their tutorial.I am currently pursuing RHCSS which has virtualization concept.Perhaps you can get some info in redhat website.

With Regards,
Puja

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: XEN Virtualization in Linux
« Reply #6 on: June 08, 2009, 04:37:26 AM »
hmm Thanks , I have already tried it on redhat website but somehow its not clear. Anyways Thanks again.

I am also planning to do RHCSS  but now a days very busy in prod related issues for my project.