SyzygyDE
Contributor
Contributor

Thin Provisioned Disk question

hello

we virtualized an windows hardware server.

This Server has 2 disks

1 disk is 140 GB and the other is 750 GB

(what you see in Windows and what you see in Vsphere)

After virtualization with final Synchronisation we reduced the second disk (750 GB)

with a partition tool to 250 GB.

Before it was not possible cause of the Raid of the System.

But - i cant set the size to 250 GB in Vpshere for this disk.

How can i reduce the vmdk to the "Windows" size without dataloss

thank you

0 Kudos
5 Replies
iw123
Commander
Commander

Hi,

If the disk is thin provisioned, then it will be a similar size to the partition you have in your guest OS - you may need to svmotion the disk (if you are licensed for it) in order to 'convert' it to thin to reclaim the space. This would only change the used space however, you would still see the 750GB allocation in the VMs settings.

To actually end up with a smaller VMDK, you could either use VMware converter, as this will give you the opportunity to resize the disks. Or you could provision a new 250GB vmdk for the VM, format the disk, copy the data from the other disk within the guest OS, swap the drive letters around, then eventually remove and delete the 750GB disk.

*Please, don't forget the awarding points for "helpful" and/or "correct" answers
0 Kudos
vmroyale
Immortal
Immortal

You will need to use VMware Converter to shrink this virtual disk.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
Jayden56
Enthusiast
Enthusiast

Hi

Welcome to the communities.

Please go through the below link.

http://www.vmwarearena.com/2013/03/shrink-virtual-machine-vmdk.html

0 Kudos
Shrikant_Gavhan
Enthusiast
Enthusiast

Hi SyzygyDE,

You can reclaim the unused space by below commands,

vmkfstools -y X

x is the percentage of free space you want to reclaim from that perticular datastore.

For example: consider you have a LUN of 1 TB and you resized vmdk to be 250 GB so you should have 750 GB visible on the datastore.

you can run

vmkfstools -y 60

this would free up actually 450 GB out of 750 GB(actual free space on LUN).

there is one more method you can try.

for windows os

1.run sdelete inside utility inside windows OS.

2.shutdown the guest os.

3. ssh to esxi.

4.locate the virtual machine disk

5. run vmkfstools -K virtual_machine_name.vmdk

this would show you the actual free space on the LUN when complete.

Thanks and Regards,

Shrikant Gavhane

Thanks and Regards, Shrikant Gavhane
0 Kudos
King_Robert
Hot Shot
Hot Shot

Do storage VMotion for the particular VM if you have Thin provisioning of Hard disk.

after storage migration it will acquire only that much space it is in actual is using and this way you have rest of the space will be free.

0 Kudos