Installing Xen

Dougy

Verified User
Joined
Sep 1, 2010
Messages
127
If network is fast and VT support is enabled, I can have a fresh OS install running Xen and having a fully installed HVM guest in less then 30 minutes.

EDIT: Xen will eat a single disk for breakfast. RAID1 at minimum, RAID10 best.

Moderator's Note: copied from a VirtualBox Installation thread to start a new thread on using Xen
 
Dougy, can you point to an easy-to-use how-to somewhere on installing Xen on CentOS 5? I'm having trouble figuring out where to start in the limited time I have available for the project.

Thanks.

Jeff
 
I know this may become off-topic if we persist on this thread... but ...

Dougy, can you point to an easy-to-use how-to somewhere on installing Xen on CentOS 5? I'm having trouble figuring out where to start in the limited time I have available for the project.

Thanks.

Jeff

Take a look here - http://wiki.xensource.com/xenwiki/XenFaq

Also, it's important to remember Xen uses unpartitioned space. Many people over look this. See below for an example of the Xen partitioning structure. (This is only an example of course)

/ Should be around 40-80GB. This is where your Xen iso's will be held.
LVM should be rest of the drive
SAWP no more than 4GB
 
Okay... we have this machine with two 2TB drives; I was planning on using softare RAID1, for a total of 2TB available.

So should I create one 80GB (approx) RAID1 partition, and then the rest one large partition, and doesit need to be LVM?

Where do I install the actual OS? On the 80GB partition? Or on the larger partition? Or somewhere else?

Thanks.

Jeff
 
Yes the rest of the drive needs to be an empty LVM and the OS goes on the 80 GB / partition.
 
SAWP no more than 4GB

Anything over 512 MB - 1 GB is a waste of space since the machine will be dragging long before it gets to using 4 GB of swap. I stick to 512 MB even on machines with 24 GB of ram. If you are using more than 1 GB of swap then you need to upgrade the ram.
 
Really simple.

This is the simplest:

cd /etc/yum.repos.d ; wget http://www.gitco.de/repo/GITCO-XEN3.4.3_x86_64.repo ; cd ; yum install xen* qemu -y

Set default=0, reboot, done.

I dont know why it doesnt want to let me edit.. but to continue..

Okay... we have this machine with two 2TB drives; I was planning on using softare RAID1, for a total of 2TB available.

So should I create one 80GB (approx) RAID1 partition, and then the rest one large partition, and doesit need to be LVM?

Where do I install the actual OS? On the 80GB partition? Or on the larger partition? Or somewhere else?

Thanks.

Jeff


My set up is:

10GB / partition
512MB /boot
4GB Swap

Rest unpartitioned.. then I rebooted and manually created a LVM volume.

4x500GB RAID10.

[root@xenserver ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.1G 6.2G 2.4G 73% /
/dev/sda2 925M 77M 801M 9% /boot
tmpfs 256M 0 256M 0% /dev/shm
none 256M 200K 256M 1% /var/lib/xenstored
[root@xenserver ~]# fdisk -l

Disk /dev/sda: 1999.3 GB, 1999305179136 bytes
64 heads, 32 sectors/track, 1906686 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 3815 3906544 82 Linux swap / Solaris
/dev/sda2 * 3816 4769 976896 83 Linux
/dev/sda3 4770 14306 9765888 83 Linux
/dev/sda4 14307 1906686 1937797120 8e Linux LVM
 
Really simple.

This is the simplest:

cd /etc/yum.repos.d ; wget http://www.gitco.de/repo/GITCO-XEN3.4.3_x86_64.repo ; cd ; yum install xen* qemu -y

Set default=0, reboot, done.

I guess I should also mention my / is only 10GB because I use netinstalls only and a Windows server 2008 iso.. so 10GB is plenty.

[root@xenserver ~]# ls /isos
7600.16385.090713-1255_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso
CentOS-5.5-x86_64-netinstall.iso
FreeBSD-8.1-RELEASE-amd64-bootonly.iso
pbxinaflash17551-x86_64.iso
trixbox-2.8.0.4.iso
[root@xenserver ~]#

I was playing with PBX's - i can even trim down my usage by getting rid of pbxinaflash.
 
EDIT: Xen will eat a single disk for breakfast. RAID1 at minimum, RAID10 best.

I do not understand that since RAID1 is simply a mirror and does not enhance performance. Xen will run just fine with a single disk if one wants to risk the one drive going bad at some point which could be years.
 
I do not understand that since RAID1 is simply a mirror and does not enhance performance. Xen will run just fine with a single disk if one wants to risk the one drive going bad at some point which could be years.

Exactly. Xen will eat the a disk alive... aka it will die fairly fast. So RAID1 helps cover your arse when it happens.
 
Xen will not cause a drive to die faster than any other software.
 
@Floyd:

Thanks for all your help.

@Dougy:

And thank you as well, Dougy.

1) you can't edit your post because you're not yet a Verified User. It's an anti-spam measure; don't take it perosnally. I don't know what you need to do to become a Verified User, so I can't tell you.

2) What do you mean by: Set default=0?

3)Finally I'm getting somewhere. I currently use PiaF at an external vPBX provider. Can you supply me with a PiaF image?

Maybe i'll even get to the testbed this weekend.

Can I build the whole thing in my home office with private IP#, and then change it before taking it to the Data Center? I mean the Xen, not the DirectAdmin?

Thanks.

Jeff
 
Can I build the whole thing in my home office with private IP#, and then change it before taking it to the Data Center? I mean the Xen, not the DirectAdmin?

Yup, just make sure you get all the ip/subnet/gateway/dns information correct before sending it to the datacenter.
 
Yup, just make sure you get all the ip/subnet/gateway/dns information correct before sending it to the datacenter.
Actually, I bring it to my own datacenter.

I'm pretty good at getting the network right; I've been building servers at my home office before taking them to the datacenter for over ten years now :).

And I also set up a private network on a separate NIC, which we use for our local backup (and which I can use for emergency login if necessary).

Thanks for the warning though; it's important to keep in mind.

Jeff
 
@Floyd:

Thanks for all your help.

@Dougy:

And thank you as well, Dougy.

1) you can't edit your post because you're not yet a Verified User. It's an anti-spam measure; don't take it perosnally. I don't know what you need to do to become a Verified User, so I can't tell you.

2) What do you mean by: Set default=0?

3)Finally I'm getting somewhere. I currently use PiaF at an external vPBX provider. Can you supply me with a PiaF image?

Maybe i'll even get to the testbed this weekend.

Can I build the whole thing in my home office with private IP#, and then change it before taking it to the Data Center? I mean the Xen, not the DirectAdmin?

Thanks.

Jeff

When he says set default 0, he means make sure your grub is set to boot to the xen kernel by default.

Yes, you can build everything with your private IP and change it once you get it setup for deployment. Just remember to change any Xen configs to reflect any current container's public IP assignments.

I'm sure you already know this, but if anyone else doesn't, you should only install any control panel within a VM, not the host itself.
 
It depends on your distro and how you install it. I compile an edited version to remove any bloat. I think yum will default the new kernel for you.
 
3)Finally I'm getting somewhere. I currently use PiaF at an external vPBX provider. Can you supply me with a PiaF image?

PIAF is very easy with HVM Xen.. you can quite literally boot the ISO as if it were a CD rom connected to the VPS. I can help you for free to get it going if you desire. Maybe i should develop XenTemplates.com one of these days

Can I build the whole thing in my home office with private IP#, and then change it before taking it to the Data Center? I mean the Xen, not the DirectAdmin?

yes. in my set up at least - every VM has a default gateway set in it, and it takes what's defined. my hostnode is in one Class A, and my VM's are split inbetween 2 other class A's - they are not interdependent.

2) What do you mean by: Set default=0?

/boot/grub/menu.lst

Set default=0.

Doesn't the installation set up the new kernel? Or is there something I need to do?

Thanks.

Jeff

Generally, default=1 is set and it will boot stock kernel - so set default=0 and it will boot Xen goodness.

@Dougy,

You're now a verified user.

Jeff

win. how does that work
 
Back
Top