slanaro
Contributor
Contributor

Issue with VMDK space

Hi all,

I installed Kali Linux from an image that is provided from work a while ago, and because the disk was initially only 30GB I had to decrypt it and enlarge it with GParted. VMWare has recently been complaining that the disk of my host machine is running out of space, and for some reason the vmdk disk for this VM is taking more space than it should.

As you can see below, the disk should only take about 200GB:

slanaro_0-1625702689007.png

Although the sum of all of the vmdk files is a lot more than that:

slanaro_1-1625702721472.jpeg

Any idea how this can be fixed?

PS: The VM's disk isn't even half full

0 Kudos
13 Replies
ajgringo619
Enthusiast
Enthusiast

Looks like you may have a couple of snapshots. Can you remove any of those? Also might want to compact the disk.

0 Kudos
slanaro
Contributor
Contributor

I did have two snapshots but I deleted them yesterday:

slanaro_0-1625706373444.png

 

Also I did try compacting the disk.

0 Kudos
ajgringo619
Enthusiast
Enthusiast

Can you explain what the Kali Linux disk1.vmdk and Kali Linux disk1-000002.vmdk disks are for? Are they leftovers from a previous installation?

Since they're not being referenced in your current setup, I would move them to see if anything is complaining. If there is something on those disks, you can always mount them at your leisure.

0 Kudos
slanaro
Contributor
Contributor

If I move either of those, at startup it will complain about either one or the other:

slanaro_1-1625711356542.png

And in the settings it will say it can't retrieve the parent disk?

slanaro_0-1625711330140.png

 

0 Kudos
ajgringo619
Enthusiast
Enthusiast

Can you post your Kali Linux.vmx file?

0 Kudos
slanaro
Contributor
Contributor

Sure, here it is:

#!/usr/bin/vmware
.encoding = "UTF-8"
displayname = "Kali Linux"
guestos = "other5xlinux-64"
virtualhw.version = "18"
config.version = "8"
numvcpus = "4"
cpuid.coresPerSocket = "1"
memsize = "8192"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
usb.present = "TRUE"
sata0:0.present = "TRUE"
sata0:0.deviceType = "disk"
sata0:0.fileName = "Kali Linux-disk1-000001.vmdk"
sata0:0.allowguestconnectioncontrol = "false"
sata0:0.mode = "persistent"
sata0.present = "TRUE"
ethernet0.present = "TRUE"
ethernet0.virtualDev = "e1000"
ethernet0.addressType = "generated"
ethernet0.allowguestconnectioncontrol = "true"
toolscripts.afterpoweron = "true"
toolscripts.afterresume = "true"
toolscripts.beforepoweroff = "true"
toolscripts.beforesuspend = "true"
extendedConfigFile = "Kali Linux.vmxf"
virtualHW.productCompatibility = "hosted"
floppy0.present = "FALSE"
tools.syncTime = "FALSE"
numa.autosize.cookie = "40012"
numa.autosize.vcpu.maxPerVirtualNode = "4"
uuid.bios = "56 4d 21 96 6d db 51 73-05 c2 0c 77 6e b2 e6 d3"
uuid.location = "56 4d 21 96 6d db 51 73-05 c2 0c 77 6e b2 e6 d3"
sata0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "33"
vmci0.pciSlotNumber = "34"
sata0.pciSlotNumber = "35"
svga.vramSize = "268435456"
vmotion.checkpointFBSize = "4194304"
vmotion.checkpointSVGAPrimarySize = "268435456"
vmotion.svga.mobMaxSize = "268435456"
vmotion.svga.graphicsMemoryKB = "262144"
ethernet0.generatedAddress = "00:0c:29:b2:e6:d3"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "1857218259"
monitor.phys_bits_used = "45"
cleanShutdown = "TRUE"
softPowerOff = "FALSE"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
mainMem.freeSpaceCheck = "FALSE"
svga.guestBackedPrimaryAware = "TRUE"
scsi0.virtualDev = "lsilogic"
scsi0.pciSlotNumber = "36"
scsi0.present = "TRUE"
checkpoint.vmState = ""
toolsInstallManager.lastInstallError = "0"
tools.remindInstall = "FALSE"
toolsInstallManager.updateCounter = "1"
tools.upgrade.policy = "useGlobal"
gui.lastPoweredViewMode = "fullscreen"
isolation.tools.hgfs.disable = "FALSE"
sharedFolder0.present = "TRUE"
sharedFolder0.enabled = "TRUE"
sharedFolder0.readAccess = "TRUE"
sharedFolder0.writeAccess = "TRUE"
sharedFolder0.hostPath = "/home/stefano/Downloads"
sharedFolder0.guestName = "shared"
sharedFolder0.expiration = "never"
sharedFolder.maxNum = "1"
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"

0 Kudos
slanaro
Contributor
Contributor

It won't let me paste the whole thing for some reason, please use this link: https://pastebin.com/CrLB7MG3

0 Kudos
ajgringo619
Enthusiast
Enthusiast

Interesting...no mention at all of the other vmdk disks. You may want to give vmware-vdiskmanager -k your_vmdk a try; this should shrink/compact the disks while off-line. This does not explain, though, why the other vmdks are necessary. I'm thinking you might need to clone the VM and check to see what was copied.

0 Kudos
wila
Leadership
Leadership

Hi,

You still have at least one snapshot even while the snapshot manager does not show it.
This happens when the .vmsd goes out of sync.

This is not a problem for your VM, but it does not help with you trying to reclaim disk space.

In order to get rid of the snapshot try the following:
- create a new snapshot.
- immediately delete that new snapshot again.

Usually that cleans up the extra snapshot(s).

--
Wil

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

I think you may be right, although if I try to create a snapshot and delete it I get the following error:

slanaro_0-1625792442022.png

I have freed up some space and now have 100GB of free space so that doesn't make sense. I can also see that it has now created new files for each snapshot I have attempted to create:

slanaro_1-1625792470945.png

The disk name also changed to the most recent one

slanaro_0-1625792730169.png

 

0 Kudos
wila
Leadership
Leadership

Hi,

As you can see in your file listing, one of the snapshots is 168GB in size.
Just to be able to commit that one snapshot you need at least 168GB in free disk space (and then some more extra as you're folding your snapshot in the base disk)

So a rough estimate is that you need at least 200GB free disk space in order to commit your snapshots.

This would never have been a problem if you had used the split disk option. But you can't change that until after you get rid of the snapshots.


With a virtual disk using split files a 200GB virtual disk would use 200/32=6.25GB disk slices and you would only need about 7GB of free disk space to commit snapshots or any of the other disk operations you can do with a virtual disk.

--
Wil

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

Is there anything else I can do at all? Like move the disk files to another computer with enough space, add it to another VM and delete the snapshots from there?

0 Kudos
wila
Leadership
Leadership

Hi,

Adding the disk to another VM would not work, but you can move the VM itself to another disk or another computer, open the VM and commit the snapshots down there yes.

--
Wil

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