LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2009, 08:54 AM   #1
gitecravirs
Member
 
Registered: Mar 2009
Posts: 40

Rep: Reputation: 15
Lightbulb xen installation and configuration


Hi, i want to install xen (on my ubuntu-8.04)for creating several virtual machines.can any one send me the procedure for installing and configuring the latest version of xen onto my ubuntu-8.04. And also send me how to use this properly, if its possible.
Thanks...
 
Old 04-11-2009, 02:09 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Here is a very quick overview of what I did a while back.

I'm no Xen expert and I used the testing environment which I do NOT recommend. You're better off looking for good documentation but here it is all the same:

Install
Code:
# apt-get -V install linux-image-2.6-xen-686 xen-hypervisor-3.2-1-i386 xen-utils-3.2-1 xen-tools bridge-utils libc6-xen lvm2 vim -t testing
Change Xen to NAT

Change from bridged

Code:
# grep -v ^# /etc/xen/xend-config.sxp |grep ..
(network-script network-dummy)
(vif-script vif-bridge)
(dom0-min-mem 196)
(dom0-cpus 0)
(vncpasswd '')

to Natted

Code:
# grep -v ^# /etc/xen/xend-config.sxp |grep ..
(network-script network-nat)
(vif-script     vif-nat)
(dom0-min-mem 196)
(dom0-cpus 0)
(vncpasswd '')

Code:
# /etc/init.d/xend restart

Create a domU

The simplest way I have found to do this is using xen-create-image

Prepare LVM

Partition your disk so that you can assign partitions to LVM. I tend to make partitions of 20G to 50G to have a bit of flexibility.

Code:
# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ac992

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         637     5116671   83  Linux
/dev/sda2             638         892     2048287+  82  Linux swap / Solaris
/dev/sda3             893       30401   237031042+   5  Extended
/dev/sda5             893        3325    19543041   83  Linux
/dev/sda6            3326        5758    19543041   83  Linux
/dev/sda7            5759        8191    19543041   83  Linux
/dev/sda8            8192       14271    48837568+  83  Linux
Code:
# pvcreate /dev/sda5 /dev/sda6
  Physical volume "/dev/sda5" successfully created
  Physical volume "/dev/sda6" successfully created
Code:
# vgcreate vm /dev/sda5 /dev/sda6
  Volume group "vm" successfully created
Code:
# vgdisplay
  --- Volume group ---
  VG Name               vm
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               37.27 GB
  PE Size               4.00 MB
  Total PE              9542
  Alloc PE / Size       0 / 0
  Free  PE / Size       9542 / 37.27 GB
  VG UUID               Tdmir3-SIS9-BB5y-lbpA-tpDL-qXcL-J4HvvO


Create a domU

Before launching the command, you might want to add a couple of files and dirs in /etc/xen-tools/skel/ so that they can be added to you installation. Things like /etc/apt, /etc/resolv.conf, ...

Code:
# xen-create-image --debootstrap --cache=yes --lvm=vm --size=10Gb --memory=512MB --swap=1Gb --fs=ext3 --arch=amd64 --dist=etch --accounts --passwd --cache=yes --hostname=my.domain.com \
--ip=10.0.0.1 --initrd=/boot/initrd.img-2.6.18-6-xen-amd64 --kernel=/boot/vmlinuz-2.6.18-6-xen-amd64 --mirror http://ftp.debian.skynet.be/ftp/debian

Now we can check the configuration file before starting domU. You might want to make some changes. I noted that if I only specify an IP in the range 10.0.0.0/24 NATing works.

I have added my network preferences in skel so I will need to mount the newly created LV and change the IP address.
 
Old 04-13-2009, 07:24 AM   #3
gitecravirs
Member
 
Registered: Mar 2009
Posts: 40

Original Poster
Rep: Reputation: 15
Unhappy xen installation poblem

hi, im not following your method for installing the xen server as i have started it before getting your mail.
i have installed base xen os onto my ubuntu-8.04 by giving command->
apt-get install ubuntu-xen-server and then 2.6.24-23-xen is installed onto my ubuntu-8.04.
But when i try to install base OS stuff in /mnt and guest OS then im getting following error and problem-----

Install the base OS stuff in /mnt using "debootstrap":

# debootstrap --arch amd64 hardy /mnt http://archive.ubuntu.com/ubuntu
Retrieving Releases (and then my system is stoped)
failure trying to run : chroot /mnt mount proc proc /proc
im unable to fix it, please help....
 
Old 04-14-2009, 01:44 AM   #4
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Those where just my notes for you to play with. Did you reboot before trying to create a DomU?

I used LVM so that I can expand the images as needed.

IMHO, you should read a bit more about Xen before playing with it or you'll keep stalling.
 
Old 04-14-2009, 11:51 PM   #5
gitecravirs
Member
 
Registered: Mar 2009
Posts: 40

Original Poster
Rep: Reputation: 15
xen installation poblem

ya i have rebooted the system and then tried out to create domU. but still getting the same error after running the following command----
# debootstrap --arch amd64 hardy /mnt
http://archive.ubuntu.com/ubuntu

error: Retrieving Releases (and then my system is stoped)
failure trying to run : chroot /mnt mount proc proc /proc
 
Old 04-16-2009, 01:57 AM   #6
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Have you tried xen-create-image. It's powerful and might make your life easier. See my example above.

Do you have chroot installed?
 
Old 04-16-2009, 06:36 AM   #7
gitecravirs
Member
 
Registered: Mar 2009
Posts: 40

Original Poster
Rep: Reputation: 15
xen installation poblem

Quote:
Originally Posted by eco View Post
Have you tried xen-create-image. It's powerful and might make your life easier. See my example above.

Do you have chroot installed?
ya i have chroot installed in /usr/sbin.I have ubuntu-8.04 hardy version. Is there any problem in installing xen on ubuntu-8.04 compare to ubuntu-8.10.
would u like to suggest me to have ubuntu-8.10, if yes then how to upgrade my ubuntu-8.04 to ubuntu-8.10 without using any cdrom?
 
Old 04-17-2009, 01:45 AM   #8
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi gitecravirs,

I have in running on Debian Etch which I suspect is the equivalent of Ubuntu 8.10. If you'd like to upgrade, after backing up all of your data of course, go to this link.

Before upgrading though, I'd go over the documentation of Xen and try and figure out what's wrong. If there is a Xen Kernel for Ubuntu 8.04, I suspect it's because it will work so take a step back and read a couple of howtos and Xen doc.

Best of luck.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xen won't boot windows installation, everything seems ok scheidel21 Linux - Software 4 12-24-2009 10:26 AM
Dom U Installation Problems on RHEL5+ Xen (installation exits abnormally) dmpatra Red Hat 1 07-24-2007 05:46 PM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 11-05-2006 12:21 PM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 10-21-2006 11:33 PM
dependency/configuration problems trying to install xen on etch kpachopoulos Debian 2 08-19-2006 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration