1000 ways to extend the size of a vm partition

There are thousand ways to extend the size of a virtual machine. Here’s one:

The partition we want to extend is a windows system partition and of 8 GB size. We want to increase the size to 20 GB. Let’s say the name of the vm partition is: Windows XP Professional-000001-cl1.vmdk

Step 1:
Use the vmware-vdiskmanager.exe (to be found in the vm ware program files folder) to extend the virtual drive. The call for that would look like:

vmware-vdiskmanager.exe –x 20G „Windows XP Professional-000001-cl1.vmdk“

Step 2:
So far we just increased the size of the drive, but not it’s logical partition. The problem is, that Windows does not allow us to extend a system partition. That’s why simply add the drive as a second drive to a second Windows vm. The best would be to use a Server virtual machine, because the server comes with the necessary command line tools we going to need in the next step.

Step 3:
After booting our second we vm, we can now use the command line tool DiskPart to extend our partition on the drive we just added. Disk Part has it’s own command line interface. The first command we use is to list the volumes: list volume

Then select the second volume by typing select volume 2

After the volume is selected we type the extend command and our partition gets extended.

Step 4:
Remove the second disk from your second vm.

Step 5:
Restart your vm and the disk should be extend now.


SQL Express Auto-Close feature

Recently I stumbled upon some event log entries created in the SQL Server Express, like:

“SQL Server has encountered 2 occurrence(s) of cachestore flush for the ‘BoundTrees’ cachestore (part of plan cache) due to some database maintenance or reconfiguration options”

This is caused by a default settings for databases in SQL Express, which closes automatically the database when there was no connection for a period of time.

For a development environment having the auto-close setting turned on makes absolutely sense, since it saves CPU an memory.
In a production system though, I tend to turn this feature off to increase performance.


Adding a windows task to an event

Windows Vista, 7 and Windows 2008 Server now support to add a windows task to a specific event.

Let’s say you want to be notified by email everytime the ASP.NET unhandled exception event (id 1309) occurs:

Open the event viewer and the event from the list. Click on “Attach a Task to this log…” from the actions menu. This opens the simple task wizard bound to the event ID. Then simply choose send email and provide the usual information like recipient, from address and smtp server.

Then you’ll get an email every time to the event is thrown.

How to activate Windows Installer Logging

Windows Installer has a built-in logging functionality that can be activated in the registry.

Just add the following key to the registry:


Reg_SZ: Logging
Value: voicewarmup

Now a log file in the temporary folder will be created every time you run the installation.

Don’t forget to delete the value after debugging, otherwise your temp folder may burst, because this key enables logging for all MSI based installations on your machine.