Well, I learned a hard lesson today when I decided to give more hard drive space to one of our virtual machines. We run a virtual environment based on VMWare ESXi and have a few virtual machines set up on one physical server. Our SQL server is running on a dedicated 135GB hard drive with original allocation of 100GB.

I needed some more space for our large SQL files and decided to take advantage of remaining 35GB of storage on that drive. Sounds pretty straightforward doesn’t it? It wasn’t that straightforward in reality unfortunately. When I increased that VM storage size in vSphere from 100Gb to 130Gb (the VM was off) and clicked Okay, I was unpleasantly surprised to find out that I cannot start this VM anymore. Now it keeps giving this error message: “Insufficient space on datastore”.

These are the lessons I learned after giving a try to all sensible options:

  1. VMWare vSphere doesn’t allow you to decrease provisioned storage size. It doesn’t give you any error messages when you click Ok button, it simply doesn’t do it quietly. Not very helpful, is it?
  2. When vSphere advises you on the available/taken space it only takes into account the main *.vmdk file. In reality there is a bunch of other smaller files in the VMWare VM folder which are not accounted for (especially dynamically created log files). They take space too.
  3. When VMWare starts a VM it looks for some free space (not sure how much though) for its own system files which it puts on the same storage. When it doesn’t see enough space it throws this notorious message “Insufficient space on datastore ””. vSphere doesn’t seem to care much about users when it allows you to increase the allocated datastore size to the limit when it effectively kills the VM.

The only available option I could come up with was to migrate that VM to another, bigger datastore.

I guess the VMWare vSphere client could be a bit more user friendly.

You may also like

ASP.NET MVC [HandleError] and logging

Recently I’ve been surprised to find out that the ASP.NET MVC [HandleError] attribute forces your website to bypass the Application_Error event. Typically Application_Error is your last resort to log errors. Logging is a vital feature of any application and I wouldn’t like to stop using it in favour of the [HandleError] attribute.

Keep Reading

Linq – SubmitChanges does not work

This is one of those very annoying things you just have to ask the developers of the Linq Library: “Why don’t you throw an exception for us??” When you use Linq to SQL you need to make sure that the table has a primary key specified. Otherwise when you call SubmitChanges nothing will happen!

Keep Reading

Newsletter sign up

Every couple of months we send out an update on what's been happening around our office and the web. Sign up and see what you think. And of course, we never spam.