Tag Archives: xen

Highly available load Balancer + web server in centos

This tutorial is about creating a highly available HTTP load balancer using HAProxy. The setup can be slightly complicated but you will appreciate the result – you will get a load-balanced + highly available web service in your network. Basic linux skill is assumed. Scenario: Imagine we have 2 physical machines. In each machine, I … Continue reading

converting hvm xen guest to pv guest

This is as simple as installing kmod-xen in the pv guest. I could boot from rescue disk, then do a yum install.

Attaching cdrom to xen guest

If your guest is running xm block-attach server_name /dev/cdrom r to add cdrom in the config file disk = [ “phy:/dev/vg/hermes,xvda,w”, “phy:/dev/cdrom,xvdb:/dev/cdrom,r” ]

Xen: add sound to domU

Update xen and just add soundhw=”all” to the xen config file and its all done. Simple and sweet.

Xen: Booting into run level 1

Booting into run level 1 from grub is useful in times of troubleshooting. I am using centos and my problem is when I am using xen, everything is automated by the pygrub bootloader. I tried to google for a solution for a long time and couldn’t find anything. Someone suggested changing the inittab. Yes, I … Continue reading

Creating Xen Redundant Virtual Machines with Backup Procedures

It is a good idea to backup the whole virtual machine to a separate machine to achieve redundancy. 99% uptime and full redundancy can be achieved using on-the-fly mirroring, ie network raid 1. Hardware and network performance will determine if this method will work or not. There are a few software that can achieve this. … Continue reading

Resizing file based xen virtual machine

You can create file based xen instances (eg, blarblar.img). If you have partitions in the file and want to increase the disk space, you cannot use resize2fs straight away on it. So you need to create a new larger file, then transfer the old file data onto it: say I want the new filesize to … Continue reading

How to resize LVM running Xen part 2 – decrease disk size

shrinking a lvm partition is straight forward if it doesn’t contain a partition table. Simply do a: umount lvm_partition resize2fs /dev/vg/lv newSize lvresize -L disksize /dev/vg/lv resize2fs /dev/vg/lv execute the last command if nessary. Assuming you have a partition table in a 10G domU which uses the default partition table, Disk /dev/xenvg/XenWeb: 10.5 GB, 10502537216 … Continue reading

How to resize LVM running Xen part 1 – increase disk size

Resizing a lvm partition is straight forward if it doesn’t contain a partition table. Simply do a: lvresize -L disksize /dev/vg/lv resize2fs /dev/vg/lv If it is running a virtual machine like xen with a partition table, how to resize the domU, whether to shutdown domU or not depends largely on the partiton structure. In centos, … Continue reading

Xen Guest, Dom U – dont use LVM

I dont see any reason why one should use lvm in xen guest. The whole idea of using lvm is to have the ability to resize disk size easily and resizing a xen guest can be done easily without using LVM. Actually, having LVM in xen guest complicates the process of resizing… You can google … Continue reading