Thursday, August 20, 2009

VMware vSphere hotplug

Hotplug of virtual hardware is attractive feature of VMware ESX 3.x/4.x. In case of ESX 3.x it is limited to hotadd of virtual disk to a running virtual machine only. With next generation of VMware vSphere hypervisor you are able to hotadd of memory or CPU to a machine if guest operating system supports it.

I was surprised during vSphere evaluation how it pretty works. I used to hotadd of virtual disks to my machines quite often. But when I upgraded 3.5 infrastructure to new vShpere 4.0, I became disappointed because it stopped working.

The reason why is simple. Hotadd feature is available from advanced edition only and I was upgrading to standard edition which doesn't contain license for it. You can check it in my previous post VMware vShpere 4.0 editions . Below is an error message which is complaining about missing license:

I think it wasn't a right decision to shift the feature to the higher editions. I think it would be better to leave things where they were because people are used to using them. And I hope that VMware will push back at least hotadd of virtual disk in some future release of vSphere.

Wednesday, August 19, 2009

Linux rc.local script

Sometimes, you need to run some commands during your Linux server startup. And you don't want to waste time with preparing valid init script now. The common task is to load some kernel module or to change speed of network interface and so on.

Red Hat distributions provides for this task rc.local script. You can find it in the directory /etc/rc.d. The script is executed after all the other init scripts. This is ensured with the proper START scripts linking to the /etc/rc.d/rc.local script:


SUSE distros like SLES or OpenSUSE provide similar mechanism. You have available two scripts. The before.local script should contain everything you want to run before runlevel is entered. The after.local script works like RedHat's rc.local script. It contains stuff which should be executed after runlevel is reached. The scripts don't exist by default, you need to create them at first in the directory /etc/init.d. They don't have to be set executable.

Besides this, the RedHat's rc.local script is executed only in runlevels 2, 3, 4 or 5. It is ignored in the single user mode. SUSE's version of after.local or before.local is interpreted during all runlevels including runlevel 1.