Archive for February, 2010
How to add an additional local disk to your XenServer 5.5 host
After I described how to convert an existing local XenServer storage repository to support thin provisioning I’m now going to show you how you can add an additional local disk to your XenServer host.
Actually that’s pretty straight forward and the first thing you have to do is to add a new physical hard drive in your host. After that you boot up your XenServer again and go to the CLI.
[Side note: Red marked entries have to be changed with your own parameters or can differ from my entries. Also the command you have to enter on the CLI are marked bold.]
On the XenServer CLI you have to list your physical disk with fdisk.
fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 499 4008186 83 Linux
/dev/sda2 500 998 4008217+ 83 Linux
/dev/sda3 999 30401 236179597+ 83 Linux
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
There you can see your new hard drive. In my case it shows up as /dev/sdb. For integrating the hard disk into your XenServer you first have to reveal the UUID of your host. This is done by the following command. More…
How to enable thin provisioning on a local XenServer 5.5 storage repository
Today I rebuild my personal XenServer lab using the new Update 2 release. While doing this it came to my mind if it is possible to fit some more virtual machines on the local drive of my XenServer. And yes it is possible – it’s called thin provisioning. Actually there are two ways for enabling thin provisioning, which I will show you in a second.
But why you should do this? For example if you want to install Windows 7 you need at least 10GB of disk space. So you create a VM with a 10GB HDD. That’s fine if you just want to use Windows 7 without any application. But what if you want to add some applications? Then you’re in trouble. First you have to extend the virtual disk of your VM and then you have to extend your Windows partition inside the VM. While this is really easy using Windows 7, it’s kind of tricky with older versions of Windows like XP or 2003. With thin provisioning enabled you can actually create a very large disk, let’s say 100GB. This disk then only allocates the space which is really needed by the OS inside of the VM. So if you install Windows 7 on this 100GB VM it only allocates 5GB of local disk space on your XenServer host and not the whole 100GB. You see the benefit? Additionally you can now use fast cloning if thin provisioning is enabled. If you clone a VM it doesn’t clone the whole VM instead only a delta virtual disk is created for the VM clone. More…