Menu
InformatiWeb Pro
  • Index
  • System admin
  • Virtualization

Login

Registration Password lost ?
FR
  • Windows Server
    • WMS 2012
    • WS2012 R2
    • WS2016
  • Citrix
    • Citrix NetScaler Gateway
    • Citrix XenApp / XenDesktop
    • Citrix XenServer
  • VMware
    • VMware ESXi
    • VMware vSphere
    • VMware Workstation
  • Microsoft
    • Hyper-V
  • RAID
    • Adaptec SmartRAID
  • UPS
    • APC Back-UPS Pro
  • InformatiWeb Pro
  • Virtualization
  • VMware
  • Courses
  • Learn in depth the VMware Workstation Pro virtualization solution
  • Reclaim space not used by your VMs
7 / 52
  • Clone your virtual machines
  • Manage virtual hard disks
  • VMware
  • 08 May 2020 at 09:06 UTC
  • InformatiWeb

Easily reclaim space not used by your virtual machines with VMware Workstation 16 or 15

With VMware Tools and drag-and-drop file and copy-and-paste options, you can easily transfer files from the host PC to the virtual machine and vice versa.

Moreover, by using your virtual machine while surfing the Internet, by installing and uninstalling programs, you will see that your virtual machine will take more and more space.
This is because all data created on the virtual hard disk is not actually deleted when you delete the corresponding data from the guest OS.
What is also the case in reality, hard drive clusters are simply marked as "free", but the data is still there in the real world.

  1. How does the VMware Workstation drag and drop work ?
  2. Cleaning the virtual hard disk

1. How does the VMware Workstation drag and drop work ?

When you drag and drop files from the host PC to the virtual machine (or vice versa), the files to be transferred are temporarily placed in a subfolder of the "VMwareDnD" folder (which means : VMware drag n drop), and then moved in the final location.
Except for some unexplained reason, these data are not always deleted automatically once the transfer is complete.

Important : this "VMwareDnD" folder is present on the host PC AND in the virtual machine in the same location. This means that the undelete drag and drop files take up twice the size on the host PC.

Now that you know that, you will also understand why drag and drop of files doesn't work anymore sometimes.
Indeed, since the drag and drop files always pass through this folder and this folder is on the C partition, if there is not enough disk space on this partition, drag and drop will no longer work.

Plain Text

Cannot write file to virtual machine.

Canceling the file copy operation.

This can also happen if you move a 20 GB file (for example) and only 10 GB of free space remains on partition C.

As you can see, each subfolder contains files that you previously moved.
And when they are large, it makes you needlessly lose space on your host PC.
In addition, it may happen that the anti-virus installed in the virtual machine eventually detect these dangerous files (that you thought to have deleted).

As you can see, over time, this folder may take up unnecessary space and cause you to lose a few gigabytes of data unnecessarily.

To recover space on your host PC, start by regularly removing the folders in "%temp%\vmware-[Windows session name]\VMwareDnD" on the host PC AND in the virtual machine.

This will allow you to recover several MB or GB of space in the virtual machine.
Nevertheless, these data are probably still in the virtual hard drive for the moment.

Feel free to clear the cache and delete the history of the different web browsers that you have installed.
Indeed, although the cache allows sites to load faster when you visit them again, the cache can also take several hundred MB on the hard drive.
It's therefore interesting to empty it from time to time.

For the moment, the C partition of the guest OS tells us that there is 36.4 GB free.

To recover even more space, you can delete old temporary files using the Windows Disk Cleaner.
To do this, right click "Properties" on the C partition and click on : Disk Cleanup.

First click on the "Clean up system files" button if it's displayed.

Then, when this window reappears, check all the boxes and click OK.
As you can see, in our case, Windows will be able to remove some extra GB of data that is no longer needed.

Note that for temporary files, this tool will only delete unmodified files for more than a week. This avoids deleting a temporary file currently used by a program.

Click : Delete Files.

Wait while cleaning the disk.

As you can see, we went from 36.4 GB free to 39.6 GB.

2. Cleaning the virtual hard disk

Now that all temporary and/or useless files have been removed from the guest OS, don't forget to also clean the virtual hard disk of this virtual machine.
By default, data deleted from the guest OS is still in the virtual hard disk. To permanently delete them and finally recover the free space from the guest OS, you will need to use the "Clean Up Disks" option.

Note that this option performs better than the "Compact" option that doesn't support deleting deleted files after creating a snapshot.

As you can see, VMware Workstation will be able to recover 2.2 GB of free space on the physical hard drive by deleting the data that is no longer used by the guest OS :

Plain Text

Disk cleanup can reclaim disk space that is allocated to virtual disk files but that the guest OS no longer uses.

Note that you can choose to automatically clean the virtual hard disk of your VM every time it is shut down if you wish.
To do this, in the Options tab of your virtual machine's settings, click on "Advanced" and check the "Clean up disks after shutting down this virtual machine" box.

Wait while cleaning the virtual hard disk.

Share this tutorial

Partager
Tweet

To see also

  • VMware Workstation - Boot a VM on the BIOS / EFI firmware

    VMware 3/16/2013

    VMware Workstation - Boot a VM on the BIOS / EFI firmware

  • VMware Workstation 15 - Installation on Linux

    VMware 2/7/2020

    VMware Workstation 15 - Installation on Linux

  • VMware Workstation 15 - Slice the virtual hard disk of a VM

    VMware 12/24/2021

    VMware Workstation 15 - Slice the virtual hard disk of a VM

  • VMware Workstation 15.5 - Convert a Virtual PC virtual machine to a VMware VM

    VMware 12/10/2021

    VMware Workstation 15.5 - Convert a Virtual PC virtual machine to a VMware VM

Comments

  • coolcowboy
    • coolcowboy
    • on Jul 23, 2020, 3:20 AM
    Thanks a LOT, this was very helpful to me, i had lost like 40 GB in my main operative system and i didnt found a way to recover, i knew it was the vmplayer and the issue started when i began to download big files from the VM to my main OS, but not the disk clean up of windows or the option you show of the VMplayer cleand disk worked for me because i have the NOT profesional version , so those options do not appear to me. But the folder in the TEMP folder made the trick!!! Keep going and am im registerd here to be part of these comunity. Regards!:)

You must be logged in to post a comment

Share your opinion

Pinned content

  • Software (System admin)
  • Linux softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.