Thursday, December 18, 2008

Sun VirtualBox 2.1 is out

Sun has released new major version of Sun xVM VirtualBox product recently. The version 2.1.0 contains some interesting enhancements like:
  • experimental support of 64b guest on 32b host
  • experimental 3D accelration via OpenGL
  • VMware VMDK virtual disks are supported now
    • experimental support of LsiLogic and BusLogic SCSI HBAs (used with VMDK disks)
And that's not everything. There are many other things which worthwhile to read. The more comprehensive list of all enhancements and bug fixes is here.

Thursday, December 11, 2008

VMware VirtualCenter running inside virtual machine - part one

I finished another installation of virtualized environment recently. I had to get rid of old machines and to deploy virtualization on couple of new SUN Blade 6250 modules (installed in SUN Blade 6000 Modular System) connected to SUN StorageTek 2510 iSCSI disk array. The final solution had to pass high-availability conditions.

The VMware ESX Server 3.5 hypervisor was installed on both of blades and deployed in high-availability mode. It requires VirtualCenter Server to be installed to configure VMware cluster. But does it have to be installed on a standalone machine?

VMware officially supports VirtualCenter Server running inside a virtual machine (further denoted as VC VM). Such configuration supports VMware HA as well. But it will pay to keep some basic rules in mind. Let's go over them:
  1. VC VM should have allocated enough resources - set CPU/MEM reservations and shares sufficiently to avoid of running out of resources because this machine is vital for virtual infrastructure. It has to be prioritized over the other virtual machines.
  2. Remember to monitor the machine. That means configure a simple alarm to check CPU/MEM usage. E.g. it can be trigerred if the resource usage is over 90%.
  3. VC VM should be deployed with security rules in mind. Define which users can access it and limit their permissions (configure user roles with help of Active Directory).
The list above doesn't contain obvious rules like hardware requirements for server, installation of MSSQL database separately and similar. These rules are the same as for standalone VirtualCenter installation. Next, we are going to discuss the question what to NOT perform with VC VM:
  1. Never cold-migrate VC VM! The machine has to be powered off first.
  2. Don't try to clone VC VM if you are deploying version of Virtual Infrastructure before 3.5. The version 3.5 supports virtual machine cloning on the fly.
  3. Try to avoid of any operation with VC VM AKA virtual machine hardware reconfiguration which may require to power it down. If you need to do it, connect directly to the related ESX host, power VC VM off and reconfigure it without loosing management connection.
It remains to discuss the stuff around VirtualCenter virtual machine installation and to realize if such configuration will bring something new compared to standalone installation. But about it by the next time.




Wednesday, December 3, 2008

Quickly - Linux Swap space sizing

It's no surprise that many system administrators are still using this simple rule of thumb for sizing their system's swap size:
  • the swap space should be as large as twice amount of system operating memory
I belonged to them. But is it still really necessary to follow that rule when our machines are equipped with gigabytes of RAM now? Sure, it is waste of disk space. If I have a machine with 32 GB RAM, the swap space should have at least 64 GB!

This rule of thumb really held in the past but nowadays the Linux kernel and its memory management are more mature and well optimized to be able to work without any swap space. Even, if you use a swap file instead of dedicated swap partition, it should have nearly the same performance as swapping to partition. So, do we have a newer replacement for it? In genereal, it is recommended to remember the following:
  • if the machine has less then 2 GB of RAM, the swap space should have the size of it
  • if it has more, the swap space should have 2GB
In my opinion, you can't screw anything up if you set the swap space to 2 GB everytime. It has to be enough for every common situation according to the above rules. In more special scenarios, like database or web servers, it is better to follow related tuning guides.