If like me, you originally implemented some of your VMs in VMware Server (or Workstation) as thick provisioned, and have subsequently changed your mind, the process for converting them back to thin is very simple. In my case, the driver was the purchase of a couple of new SSDs, which obviously have a lot less space than my old 7200RPM SATA disks, but the performance is significantly better.
Before shrinking your VM, be sure to zero out all of the unused space (left over from file deletes). This is especially important if you have been using the VM for some time, as deleted files do not actually zero the space (just remove the pointers). I recommend using SDelete from SysInternals. Simply run “sdelete -c” to zero out all the deleted file space (experiences may vary!!!).
Once you have cleaned up (and ideally backed up) your VM, The process of migrating to a new datastore and safely shrinking / converting the VMDK files to thin provisioned, is as follows:
- Create your new datastore directory on the new drive and specify the location in VMware Server (if required), e.g.
- Create a new directory for the VM to be migrated, e.g.
- Run the following command:
“<path-to-vmware-install>\vmware-vdiskmanager.exe” -r “<old-ds-path>\<VM-Name>.vmdk” -t 0 “<new-ds-path>\<VM-Name>.vmdk”
“C:\Program Files (x86)\VMware\VMware Server\vmware-vdiskmanager.exe” -r “C:\VMs\TestVM\TestVM.vmdk” -t 0 “D:\VMs\TestVM\TestVM.vmdk”
- The VM will be converted and copied to the new location with no risk to the original file.
- Copy the remaining files from the original datastore location (minus the VMDK / vmdk-flat of course).
- Remove the old VM from your VMware Server/Workstation inventory (don’t delete the originals until you have tested the new VM!).
- Add the VM back into VMware Server / Workstation using the new datastore location, and start it up, specifying “I moved it” when prompted.
- Sit back and enjoy the extra space! 🙂
Note the same process will work for converting VMDK files between all file types, by simply replacing -t 0 with your preferred option from the list below:
0 : single growable virtual disk
1 : growable virtual disk split in 2GB files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2GB files
4 : preallocated ESX-type virtual disk
5 : compressed disk optimized for streaming
NOTE: You can also run “<path-to-vmware-install>\vmware-vdiskmanager.exe” -k “<ds-path>\<VM-Name>.vmdk” to shrink your vmdk in place, but you will need enough spare space on the same drive to do this (as much as the current vmdk file size if you don’t gain much), you lose the ability to roll back to your original file, and this wont work on thick provisioned disks.
So its that time of year again, when we VCPs have to bone up on the latest developments in the VCP world and get our exam done in time before we have to go cap in hand to our line management asking for them to pay for a course we never needed in the first place. In order to avoid this embarrassment, VMware kindly give us the opportunity (as existing VCPs) to pass the VCP-510 exam by 29th Feb 2012, bypassing the course attendance requirement (fair enough!).
As per usual, I have left this pretty much until as late as I feasibly can while still giving time for the (hopefully never required as yet) resit, meaning I am booked in to sit my exam on 1st Feb.
For the sake of others who are also planning to take this exam, I plan to post the links to all of my study aids below, along with any other hints/tips I come across for studying towards the VCP5 exam. If it only helps out one or two people it’ll be worth the effort.
One point worth highlighting is that reading books is all very well and good, but there’s no substitute for actually “doing it”. The best thing I would suggest is to create a home lab and use the vSphere 60 day evaluation to have a play with all the latest features. I have accomplished this in a couple of ways, but I found the most flexible to be running 2 x ESXi hosts and a copy of FreeNAS 7 inside VMware Workstation 8 (using NFS or iSCSI). I’ll try to create a post on this when I have time, but do a quick search on google for lots of other people with similar setups.
This should be considered a “living list” for now, and I will endeavour to update it as I find/use further resources.
- Mastering VMware vSphere 5 by Scott Lowe (Kindle Edition)
A superb resource. Even though I am already VCP3 and 4 certified, it is still worth a full read, in part as a refresher, and in part because it does highlight many of the updates with vSphere. Kindle edition is also cheaper, and lets be honest, as vSphere 5 will be out of date in another couple of years, do you really need 2 kgs of dead tree choking up your bookshelf, when you could just have an electronic copy, which you can share across all your devices?
I have spent an hour or two a night reading and taking notes from this for a couple of weeks, which is a lot less painful than trying to get through it in one go, and hopefully should ensure slightly better retention!
- VMware vSphere 5 Clustering Technical Deepdive by Duncan Epping and Frank Denneman (Kindle Edition)
Having read the vSphere 4 version of this (first Kindle book I ever bought) in prep for my VCAP-DCD 4 (still to sit), I can confirm Duncan and Frank are very capable teachers! An excellent resource which goes above and beyond the VCP requirements, but will give you a much more in depth understanding of HA, DRS, DPM, SDRS, etc. This will be invaluable when the VCAP exams are out for vSphere 5!
- VCP 5 Exam Blueprint
If you know all this, then you cant fail!
- What’s New in vSphere 5.0 Overview
A quick reminder / highlight list of all the new features in vSphere 5
- What’s New in vSphere 5.0 – Technical Whitepapers
Licensing, Pricing and Packaging
Particularly useful for a quick reminder skim for all the new features, prior to the exam.
- vSphere Private Cloud Service Definition
Whitepaper covering key terms.
- vSphere Storage Appliance
Official VMware blog post with documentation links for VSA stuff. Not covered in Scott Lowe’s Mastering Vsphere 5, but you will almost certainly be asked some questions on VSA in the exam.
- Official VMware Mock VCP510 Exam
An excellent resource, especially if you have never taken a VCP exam before. HINT: If you can pass this, you’re probably good to go for the real exam.
- VCP5 Practice Questions by Paul McSharry
A great set of practice questions being regularly updated with extra questions… I actually met Paul when he taught my VMware vSphere Design [4.x] workshop. A very knowledgeable guy, and his website (www.elasticsky.co.uk) is well worth checking out and subscribing.
- VCP Practice Exams by Simon Long
A boat-load of questions here coving general knowledge and config maximums per feature.
Please feel free to send me any links to practice questions and I’ll vet them and add them to the above list.
UPDATE: Passed the exam. See here for my exam review:
VMware VCP-510 Exam Review
, practice exams
, VMware Certification
, vSphere Storage Appliance