System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Installing RHEL as guest on XEN.

Robert Walker_8
Valued Contributor

Installing RHEL as guest on XEN.

Hi,

Trying to work my way around XEN. Its pretty easy via the packaged GUI's but quite restrictive (only supporting one virtual disk). Our build process on VM systems is to break /,/usr,/var,/tmp etc into their own virtual disks - as we would partition our normal systems. This makes virt-install, the redhat tool more than useless from what I can see.

I try and use xm create after setting up my virtual device environment and this seems to look like it will work - however havent found a way to get the system to boot an ISO cd image of RHEL, boot.iso or via NFS. I have managed to modify the environment to run HVM and boot the cd that way but it complained about the version I was trying to install as 64 bit when it was a 32 bit HVM.

Any ideas?, as spent a good couple of days on it to not show much. My fall back plan is not to use XEN and run as physicals but this isnt what I would like to do as we spent the extra $ to allow for server consolidation - however time as usual has slipped away from us.

Robert.
8 REPLIES
Robert Walker_8
Valued Contributor

Re: Installing RHEL as guest on XEN.

Well looks like I have a solution - turns out to be rather straight forward after all.

For info to others out there! There may be a better way to do it but it works and is easy for me to run with

Also anyone got any ideas on whether best to run virtual machine disks as LVM devices or LVM files?

Info on how to build XEN RHEL Guests using NFS Kickstart:

Copy RHEL cd's /images/xen/vmlinuz and initrd.img to physical host and get guest to boot from it - cant use ISOLINUX as its for bare metal apparently and pass appropriate line through extras faility - this could be linux rescue if required.

# Initial XEN Config to install RHEL as Paravirt using NFS Kickstart script
name = "test"
memory = "1024"
#
kernel="/data/test/vmlinuz"
ramdisk="/data/test/initrd.img"
#
disk = ['tap:aio:/data/test/test_root.dsk,xvda,w', 'tap:aio:/data/test/test_swap.dsk,xvdb,w', 'tap:aio:/data/test/test_usr.dsk,xvdc,w', 'tap:aio:/data/test/test_var.dsk,xvdd,w', 'tap:aio:/data/test/test_tmp.dsk,xvde,w', 'tap:aio:/data/test/test_home.dsk,xvdf,w']
vif = ['mac=00:16:3e:15:12:af, bridge=xenbr0']
vfb = ["type=vnc,vncunused=1"]
uuid = "6fea2ba7-2253-720c-aa6e-19e7c31cd641"
#bootloader="/usr/bin/pygrub"
vcpus=2
on_reboot = 'restart'
on_crash = 'restart'
extra="linux ks=nfs:ks_srv:/nfsdir/test-ks.cfg"

# Config file after system is built get pygrub to find kernel within image thus all you do is update your virtual machine and your right!

name = "test"
memory = "1024"
#
#kernel="/data/test/vmlinuz"
#ramdisk="/data/test/initrd.img"
#
disk = ['tap:aio:/data/test/test_root.dsk,xvda,w', 'tap:aio:/data/test/test_swap.dsk,xvdb,w', 'tap:aio:/data/test/test_usr.dsk,xvdc,w', 'tap:aio:/data/test/test_var.dsk,xvdd,w', 'tap:aio:/data/test/test_tmp.dsk,xvde,w', 'tap:aio:/data/test/test_home.dsk,xvdf,w']
vif = ['mac=00:16:3e:15:12:af, bridge=xenbr0']
vfb = ["type=vnc,vncunused=1"]
uuid = "6fea2ba7-2253-720c-aa6e-19e7c31cd641"
bootloader="/usr/bin/pygrub"
vcpus=2
on_reboot = 'restart'
on_crash = 'restart'
#extra="linux ks=nfs:ks_srv:/nfsdir/test-ks.cfg"
Steven E. Protter
Exalted Contributor

Re: Installing RHEL as guest on XEN.

Shalom,

Our experience is that if the Host OS is 32 bits you can't install an 64 bit guest Os.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Robert Walker_8
Valued Contributor

Re: Installing RHEL as guest on XEN.

Gday SEP,

I am aware of that one, but found running HVM on 64bit host couldnt install 64 bit guest under fully virtualised.

Anyway do you have any systems under XEN in production? Any gotchas that should be aware of in a prod environment.

Do you use physical disks on your guest or file based virtual disks?

Robert.
Ivan Ferreira
Honored Contributor

Re: Installing RHEL as guest on XEN.

Hi Robert, why do you wan to have too many virtual disks for you guest? Is not common, even if physical hardware, to have one disk for each file system. It's normal to have one partition of a device for each file system.

I'm curious about your requirement.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Robert Walker_8
Valued Contributor

Re: Installing RHEL as guest on XEN.

Gday Ivan,

In a virtual world to assist the need to move from one system or another I put the partitions as separate files. I dont know if this is a good idea - it hasnt been too bad on vmware so far - so thought XEN would be the same.

The same goes for LVMing a bunch of files into a large array with expansion capabilities down the track.

Its mainly to use the devl/test systems, but by doing these production isnt the same, thus have to do it as well.

Havent found any thing as to best practices yet.

Rob.
Ivan Ferreira
Honored Contributor

Re: Installing RHEL as guest on XEN.

We use vmware (vmotion and so), and I think that one of the general "best practices" is "keep it simple".

If you have a good reason or special requirement to do this, then it's good idea. Separating partitions on vdisks won't give you better performance unless these are different physical disks. I think that this can give you less flexibility to resize disks/partitions for example, and already started by hardering the installation process.

Well, this is just my opinion.

Have a nice day.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Heironimus
Honored Contributor

Re: Installing RHEL as guest on XEN.

I don't see any reason why it shouldn't work to use files for your disks, but you'll probably get better I/O if you point your domU's directly at devices. Linux doesn't have a filesystem like vmfs that's designed specifically for holding disk images.

When I set up my (non-RH, non-HVM, 32-bit) Xen systems I picked a naming convention for LVs that were assigned to guests (something like "guestname_mountpoint") and created the same filesystems that I do on physical machines. The only problem I remember was that resizing those volumes required shutting down the domU, but if you also use LVM in the domU you shouldn't need to resize them.
Robert Walker_8
Valued Contributor

Re: Installing RHEL as guest on XEN.

No longer relevant - moved away from VMWARE Server and onto XEN.