VMware Communities
dh4
Contributor
Contributor
Jump to solution

Shrinking disk get the error "not enough disk space" even though there is lots of disk space

I have 2 VMs that hover around 20-30 GB but can grow > 100GB through normal use on occasion.  Once I archive files being used I then shrink them back down to a reasonable size.  With recent versions of VMware player i get the error "not enough disk space" even though I have a lot of free space.  Background information below:

  • Both virtual disks are 200 GB growable single file (NOT pre-allocated)
  • Disk 1 is 120GB (current size) but should shrink down to around 50 GB when compacted
  • DIsk 2 is 80GB (current size) but should shrink down to around 15 GB when compacted
  • I have 183GB of free space on my drive.
  • Both of the VMs give the same error. 

Disk 2 should for SURE be able to fit should it not?  This used to work fine and then stopped with updates to VMware Player.  I'm running 15.5.7.  Does it now require the full 200GB to shrink now?  I have never had 200GB free on this drive ever and this has worked fine.

Thoughts?

Reply
0 Kudos
3 Solutions

Accepted Solutions
wila
Immortal
Immortal
Jump to solution

That's because you are not using split disks, but a growable single file.
If it was a split disk -which is my recommendation anyways as there is pretty much never a good reason for the single disk option- then you would only have needed about 4GB of free disk space.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

View solution in original post

Reply
0 Kudos
ajgringo619
Hot Shot
Hot Shot
Jump to solution

I just did; it's easier than I thought. This command will split the 'Windows 10 x64.vmdk' disk into a type1 disk:

vmware-vdiskmanager -r 'Windows 10 x64.vmdk' -t 1 Windows10_x64.vmdk

Here are the relevant disk types (again, from the vmware-vdiskmanager help):

-t <disk-type> : disk type id

Disk types:
0 : single growable virtual disk
1 : growable virtual disk split into multiple files
2 : preallocated virtual disk
3 : preallocated virtual disk split into multiple files
4 : preallocated ESX-type virtual disk
5 : compressed disk optimized for streaming
6 : thin provisioned virtual disk - ESX 3.x and above

 

FYI - I'm using Workstation; no idea if this is available with Player (was in the wrong forum).

View solution in original post

dh4
Contributor
Contributor
Jump to solution

@ajgringo619and @wila  thanks for the help.  I figured out how to get the result that I was looking for.  I downloaded the vmware-vdiskmanager from the VDDK site:

https://code.vmware.com/web/sdk/7.0/vddk

and was able to convert the single large disk into split disk.  Disk size reduction was a natural result.  Thanks for your help.

View solution in original post

Reply
0 Kudos
6 Replies
wila
Immortal
Immortal
Jump to solution

That's because you are not using split disks, but a growable single file.
If it was a split disk -which is my recommendation anyways as there is pretty much never a good reason for the single disk option- then you would only have needed about 4GB of free disk space.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
dh4
Contributor
Contributor
Jump to solution

Is there a convenient way to convert to split disks or rebuild the vmdk into a smaller max size?  The VMware converter tools used to do the trick for this stuff but when I tried recomposing the VM for my image it said that it wasn't able to process these images.  Our VM images are provisioned that way so we don't get a chance to create them as split disks.

Reply
0 Kudos
ajgringo619
Hot Shot
Hot Shot
Jump to solution

I just did; it's easier than I thought. This command will split the 'Windows 10 x64.vmdk' disk into a type1 disk:

vmware-vdiskmanager -r 'Windows 10 x64.vmdk' -t 1 Windows10_x64.vmdk

Here are the relevant disk types (again, from the vmware-vdiskmanager help):

-t <disk-type> : disk type id

Disk types:
0 : single growable virtual disk
1 : growable virtual disk split into multiple files
2 : preallocated virtual disk
3 : preallocated virtual disk split into multiple files
4 : preallocated ESX-type virtual disk
5 : compressed disk optimized for streaming
6 : thin provisioned virtual disk - ESX 3.x and above

 

FYI - I'm using Workstation; no idea if this is available with Player (was in the wrong forum).

dh4
Contributor
Contributor
Jump to solution

Thanks @ajgringo619 ... that's for sure a VMware Workstation toolkit but I can try that if I decide to upgrade.  It's only slightly more expensive than the VMware Player license that I have now.

I figured out that if you run with the folder compressed it will auto-shrink the VMDK file to the size that it would be if the shrink command worked and as the VM image grows/shrinks it will auto-compress the free space on the fly.  It takes a while to suspend the VM in a compressed folder but not too much of a hassle.

I still don't get why the shrink doesn't work like it used to.  The used space on the VM is only 15GB and there's way more than that free on the drive.

Reply
0 Kudos
dh4
Contributor
Contributor
Jump to solution

@ajgringo619and @wila  thanks for the help.  I figured out how to get the result that I was looking for.  I downloaded the vmware-vdiskmanager from the VDDK site:

https://code.vmware.com/web/sdk/7.0/vddk

and was able to convert the single large disk into split disk.  Disk size reduction was a natural result.  Thanks for your help.

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,


@dh4 wrote:

I figured out that if you run with the folder compressed it will auto-shrink the VMDK file to the size that it would be if the shrink command worked and as the VM image grows/shrinks it will auto-compress the free space on the fly.  It takes a while to suspend the VM in a compressed folder but not too much of a hassle.

If you mean that you are using NTFS compression on the folder in which the VM is stored then according to our local data recovery specialist Continuum that is a really bad idea.
He has warned many times that it is a sure fire way to end up with a corrupted version of your VM.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos