Xi6.org

Tag: xenserver

Citrix Xenserver Raid (Fakeraid/software raid)

by on Sep.14, 2009, under Virtualization

Xenserver doesn’t “really” support fakeraid or software raid.

Fakeraid is that of an onboard or bios type raid. All the processing is done by your CPU and is similar to software raid in that regard. But software raid is handled by the Kernel or OS.

A hardware RAID card is expensive (~$400 additional cost to a system), and is typically proprietary in the way it writes data. So if it does happen to fail, you may be SOL when replacing with a different card – or quite often the same card with a slight variation in the firmware.

These days I would say software raid is comparable in performance to hardware, but can more easily be patched or moved across different systems.

While I would like to use software raid on my xenserver installation (And it is “possible”), it’s just a little bit too much patching/hacking to get working… And there is a bit of uncertainty to what happens when the host is updated to a more recent xenserver version.

Now fakeraid is “semi-supported” on a xenserver installation… meaning you can fake raid a storage repository, but not the entire host. You’ll be better off with some raid than no raid.

You’ll need a minimum of three (3) hard drives for a fakeraid on xenserver. (one will be used to install the host, and the others will be raided for VM storage). So we’re limited to a point of failure of the host hard disk… meaning at worst if that fails you should still be able to access/restore VM’s on another xenserver (or re-install the host on a new HD and still have access to the raided storage when you add it again).

On this installation I’ll be using a 200GB drive for the host. (And may use this drive to store ISO’s and other misc files). And all my virtual machine data will be on the raided drives.

You can setup your bios raid (fakeraid) with 1 drive non-raided (the one that will hold the host), and the other drives in a raid array.

During the xenserver installation you will be asked which drive to install on. All your drives will display (non-raided), so choose the single drive you know isn’t in the array (Mine is SDA). And when asked which will be used as the default storage repository, choose the same single drive or none at all.

Once the host boots up you should get into the console.

Make sure the proper modules are installed:

# insmod /lib/modules/$(uname -r)/kernel/driver/md/dm-mod.ko
# insmod /lib/modules/$(uname -r)/kernel/driver/md/dm-mirror.ko

(This would be for a RAID1 mirror)

Execute the following command in order to init the raid:

# dmraid -ay -v

The raid device should show up as /dev/mapper/RaidVol0 (or whatever you called the raid volume in the bios).

Now we’ll want to create a new SR (storage repository) using the RAID volume:

# sm create /dev/mapper/RaidVol0

In order to have the repo avail on boot in /etc/smtab:

# xe host-sr-set -u root sr-id=rep_uuid active=true

Attach the Storage Repository:

# sm attach <rep_uuid> none

See if its active:

# sm info

If not active, restart smtab and xenagentd:

# service smtab restart
# service xenagentd restart

And that should do it.

2 Comments :, , , , , more...

XenServer (citrix) vs ESXi (vmware) vs Xen (opensource)

by on Aug.13, 2009, under Virtualization

A common question in virtualization, which option is better.

We’ll take a look at the top options. (HyperV and KVM aside because quite honestly they suck). Sorry if you’re using either of those as a virtualization solution — but HyperV is bloated and based on windows… and KVM by nature is very insecure. On somewhat of a sidenote, it’s quite unfortunate that there are so many people in the world that get “sold” by gimmicks, bulleted lists and various other hyped up garbage.

Lets start off with a basic comparison on XenServer vs Xen. Both of which are free. Xen is opensource, while XenServer is based upon Xen, it’s owned by Citrix. (It may be useful to point out that XenServer is similar to ESXi, where as Xen is quite a bit different from both).

Xen (opensource) requires a base operating system (Dom0). So for instance you would install Ubuntu or CentOS first, having a fully operating desktop machine. On top of that you would install opensource Xen and a virtual maching manager tool. You are then able to create virtual machines on top of your host OS. (While you don’t necissarly need to install the x-windows system on Dom0, it still requires a base OS as such).

The opensource Xen solution is probably a good solution for your home network. I used open source Xen on my single desktop machine (3TB HD, 4GB ram, Quad Core Processor). Which allowed me to keep my base Ubuntu installation for development, web browsing, and various other things I do on my home desktop. But also allowed me to create a media server for streaming music and videos to my PS3, a VOIP server to manage calls, a ZoneMinder server to monitor IP cameras and create a new test server when I needed to play around with other applications in a server environment.

Now looking at XenServer (citrix) and ESXi (VMware), both of which are “free” and have extra licenses you can purchase for several thousand (to several hundred thousand) dollars in order to open up some pretty cool “enterprise” features. While both can server a production environment quite well in their free versions, having used both, XenServer is a better solution. Both are a barebones/baremetal type hypervisor and take about 10-15 minutes to install. (Unless of course you run across some hardware incompability issues). But that may only be a problem with very old hardware or perhaps very new cutting edge technology.

XenServer itself has more free features out of the box, and is all around a better implemntation. One of the biggest features (though actually small), is that XenServer uses IPtables!! I can easily setup firewall rules on the hypervisor itself, helping keep my server SECURE. Where as with ESXi, the command console is VERY limited. I had to create an additional virtual machine firewall appliance, then connect my management console to the virtual machine and setup port forward rules from the virtual machine to the management interface. (So if the VM crashed, I was pretty much SOL).

Another great feature of XenServer is the ease of clustering up to 16 physical servers together! This allows for High Availability failover and high  workloads to be distributed to other servers in the cluster. It’s as simple as point and click, as well as a simple drag/drop to move one VM to another physical machine. (In HA mode, a failed server automatically migrates the VM’s to another machine). Though I believe HA requires an enterprise license.

ESXi itself doesn’t have much in terms of “cool” features, I found it kind of boring actually. I guess the only thing notable about ESXi is that you can run unmodified guests without too much “performance loss”. (Though I did find ESXi painfully slow compared to XenServer with the same Virtual Machines running).

Another thing I found is that with ESXi, creating VM’s was pretty easy; but duplicating a VM was time consuming. I/O operations are very sluggish on the system itself. XenServer allows you to template a VM so they can be duplicated quickly and easily once you had created the initial install of one VM. XenServer saves hours of time when it comes to this feature.

I guess it’s becoming pretty aparent that XenServer (citrix) is just better. On two identical physical servers (Dual Quad core processors, 16gb of ram), XenServer (besides having better management features) performed much better in comparison to the same VM installations on the ESXi host.

All VM’s were linux (CentOS) based. I don’t run windows for anything aside from the odd desktop machine here and there (if that). Though running windows hosts on ESXi is (i believe at the moment) easier then XenServer.

11 Comments :, , , , more...

Migrating Virtual Machine (VM) FROM esx to xen server

by on Jul.09, 2009, under linux/ubuntu

There seems to be a lot of posts and resources on how to migrate the other way around – but WHY?! Why would anyone want to migrate from Xen to ESX? I’ve had so many issues with ESX I’m spending thousands to create another server and migrate TO Xen!

At the time I needed a relatively quick deployment of a server which I could easily manage virtual machines etc. (Well ESXi seemed like the answer). With only about a week to get the hardware, install and send off, I managed to get it working (I can’t say installation was that easy considering the limited hardware support ESX offers).

Needless to say, after deployment I was noticing VERY poor disk performance. (Yes I installed vmware tools and all that garbage). I tweaked, re-tweaked, re-installed virtual machines, resource pools, etc etc… weeks and months go by trying to fix the piss poor performance. No one on the community forums could help – It seems everyone is running windows guests and suggesting a bunch of stuff that would never make a difference anyways. If i’m getting crappy performance with freshly installed Linux guests, something is wrong with the hypervisor (ESXi).

In any case, I can’t take it anymore – ESX has to go! Reluctant to spend another $3,000 in order to mirror the server (extended downtime to rebuild is not an option). Plus the fact that on ESX I had to install a VM specific to being the firewall for the machine. Why ESX doesn’t have iptables or any firewall/routing built in is beyond me. It’s very insecure without adding additional overhead with another virtual machine appliance.

So while I build a new server and install Xen, It’s so much better! WOOWWW! Not only does it have better features, the performance is about 4x better! I love being able to “template” a VM of a base install, then deploying it quickly and easily as a new machine. The performance is near native (I can’t tell the difference opposed to if it was a single server installed on bare hardware). Where as with ESX, I could notice the sluggishness.

Now onto the main point of this article: Converting a VM from esx to Xen!

This portion coming soon – please leave a comment if you’d like it sooner than later.

1 Comment :, , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...