Monday, 7 April 2014

Moving Thin Provisioned VMDK's

Since I purchased a new and improved HP ProLiant MicroServer (the N54L), I decided to move my ESXi host to this new hardware and repurpose the old N40L for something else (yet to be decided).

Whilst doing this, I also decided to move around where my VMs are stored in order to free up some hard drives and make use of the 250GB S-ATA drive that came with the server.

Unfortunately this created an interesting problem, without the full on vCenter Server I'm unable to move a VM or VMDK without inflating the disk from thin provisioned to thick provisioned. Since most of my disks are thin provisioned at 50GB there would be a huge increase in the amount of storage used.
Although I haven't over provisioned my storage, I wasn't comfortable filling the drive just yet. So I set about finding a solution...

My first thought was to use VMware Converter to convert from the source datastore to the destination datastore on the same host. However, it appears that this didn't work and the disk was still inflated. I am willing to accept that I setup the job in a rush and missed an option to keep the disk thin provisioned, I'm going to go back and check this again later.

In the mean time, I came across this article How to thin provision an exsiting VMWare disk on ESXi without virtual center on Slashzero.
It appears that you can use the VMKFSTOOLS to convert disks from thin provision to thick provision. By running the command, (Handy Hint: you can use tab to autocomplete file paths etc when using PuTTY connected to a ESXi host) I was able to clone a disk and turn it into a thin provisioned disk.
However, this left me with a VM named V122SRV01 but a VMDK named V122SRV01-thin.vmdk - this nags at me (call me OCD if you wish!).
So unsure as to what would happen, I ran the command again to effectively rename the disk. It worked!

After powering the VM on, it performed a disk check and booted up fine.

So give it a go, just because you've got ESXi doesn't mean you need to miss out on your thin provisioned disks!


No comments:

Post a Comment