VMware Communities
stanna
Contributor
Contributor

A large number of .vmdk files taking up over 40GB of hard drive

I have a large number of vmdk files on my Mac. They seem to add new ones every time I run Fusion. My laptop is almost at a standstill. Can I remove any? Why do they keep adding? 

0 Kudos
18 Replies
Technogeezer
Immortal
Immortal

DO NOT delete any of the files of a virtual disk manually - that is, outside of Fusion. You will corrupt the virtual machine.

let’s figure out what you have going on  Can you provide the following information:

  • From the virtual machine settings, what is the size of the virtual disk and is it configured to split the disk into multiple pieces?
  • Are there snapshots active (if so, how many)?
  • Can you post a listing of the files in the virtual machine’s bundle directory?
  • Do you have Automatc snapshots (also known as AutoProtect) configured for the VMs snapshots.  

In particular, AutoProtect will automatically create snapshots that increase the number of virtual disk files. If you have AutoProtect enabled see how many snapshots it is configured for. Better yet, turn AutoProtect off as IMO it’s more trouble than it’s worth. 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
stanna
Contributor
Contributor

Thanks so much for you reply. Please see my response below:

  • From the virtual machine settings, what is the size of the virtual disk and is it configured to split the disk into multiple pieces? Where can I locate these settings?
  • Are there snapshots active (if so, how many)? Not sure!
  • Can you post a listing of the files in the virtual machine’s bundle directory? Attached
  • Do you have Automatc snapshots (also known as AutoProtect) configured for the VMs snapshots.  Don't know!
0 Kudos
Technogeezer
Immortal
Immortal

To answer your question about where to find settings, you may want to consult Fusion Help or review the Fusion product documentation found here: https://docs.vmware.com/en/VMware-Fusion/index.html Pick the version of the product documentation that matches the major version of Fusion that you're running.

  • Virtual hard disk size and type of virtual disk can be found in the virtual machine's settings.
  • Right clicking on the virtual machine in the Virtual Machine Library will reveal a selection for Snapshots.

The files with a .vmdk extension are your virtual hard disk. It also shows that you have the default configuration for a virtual disk, which is to split it into 4GB chunks. Since there are 16 chunks (the files marked s001 through s016) the virtual disk is configured for a 64GB size.

Virtual disks by default are not pre-allocated on your Mac. They start small, and the "chunk" files grow as you put data into the virtual disk. When you fill up the virtual disk, all of the "chunk" files will grow to 4GB each, for the maximum configured capacity of 64GB.

If I add up the sizes of the .vmdk files that comes to about 36.9 GB.

There are other files in this directory necessary for the virtual machine's configuration.

The 2GB or so .vmem file is an indication to me that when you took this screen shot, the virtual machine was suspended. This file will be removed when the virtual machine is resumed from the suspended state.

You do not have snapshots or AutoProtect configured. There would be more files in here if snapshots were being taken.

Everything here is 100% normal.

Now, you say "my laptop is almost at a standstill". What's exactly happening?

To figure that out, please post more details:

  • Configuration of your Mac: model, macOS version, memory, hard disk space
  • Version of Fusion you're running
  • Amount of memory and number of processors configured in the virtual machine - in the Settings of the virtual machine, check "Processors and Memory"

If you shut down that virtual machine instead of suspending it, does the performance change upon restart of the virtual machine?

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
stanna
Contributor
Contributor

Hi again

  • Configuration of your Mac: model, macOS version, memory, hard disk space- MacBook Pro, Big Sur,8GB RAM, 121GB HDD (1.68GB free)
  • Version of Fusion you're running- Don't know
  • Amount of memory and number of processors configured in the virtual machine - in the Settings of the virtual machine, check "Processors and Memory"  2 processor cores, 6144MB remaining for Mac

If you shut down that virtual machine instead of suspending it, does the performance change upon restart of the virtual machine? Tried shutting the Virtual Machine down but no luck!

0 Kudos
Technogeezer
Immortal
Immortal

Still not enough info:

Please post:

a screen shot of "About this Mac", found here:

Technogeezer_5-1663690298987.png

 

And the dialog will look something like this:

Technogeezer_0-1663690711610.png

 

 

a screen shot of the "About VMware Fusion" dialog found here:

Technogeezer_3-1663690197011.png

And showing something like this:

Technogeezer_4-1663690234611.png

and a screen shot of the  "Get Info" of your hard drive (It's difficult to figure out the exact amount of free space by using the "Available" field of Get Info).

Technogeezer_6-1663690469375.png

 

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
stanna
Contributor
Contributor

I think I have what you asked for:

 

 

0 Kudos
Technogeezer
Immortal
Immortal

Summary:

I believe you are running into CPU and disk resource constraints Mac with what you are doing. You're also way behind on macOS updates that contain bug fixes and address severe security issues. 

Discussion: 

You did not post the "get info" for the hard drive, On the desktop, right click on your Macintosh HD and select Get Info. 

From what I'm seeing though, you are running dangerously close to filling up your boot SSD.  You have a VM that's currently taking up 40GB. If you run it so that you're adding more files to the VM, the VM's virtual hard disk can expand to a maximum of 64GB.  That will require up to 20GB of additional storage that you don't have. If your Mac runs out of space on your SSD you risk corrupting your virtual machine. Also, performance is known to drop off on SSDs as they get close to being filled up.

128GB of space is not really a lot for a macOS system - especially if you want to run a virtual machine of any appreciable size. A 64GB virtual machine at its full size takes up half your disk alone. That's not including any other applications or files that you have.

You should investigate moving that VM to run on external storage (perhaps a USB3 SSD) given you have a 128GB internal SSD. Or perhaps an upgrade to the SSD (that model does not have a soldered-in SSD, so vendors like OWC/macsales.com do sell SSD upgrade kits).

Do you have Time Machine backups configured? If so, that's an even stronger argument for moving the VM off your internal SSD. For information, please open a terminal session, issue the following command, and post the results

tmutil listlocalsnaphots /

That'll tell us if there are any local Time Machine snapshots that are taking up space on your disk. Deleting those snapshots may get us a temporary release of space, but IMO it will not be enough to fix the problem.

You are also running macOS 11.1. You are way behind on bug fixes and important security fixes (bugs that are actively being exploited in the wild). You need to get that system up to macOS 11.7 - but the problem is that you don't have a lot of disk space to do it. Shut down (not suspend) the VM, move the VM bundle to an external disk (formatted as MacOS Extended or APFS) and apply software updates.

You are also running a 2 core Mac. Configuring your virtual machine to run with 2 virtual cores may be starving the Mac for CPU resources, especially if you are running any other applications. 

What else are you running at the same time on this Mac when you are trying to run a virtual machine?

One other thing to check. In the virtual machine's preferences check:

  • Display - if Enable 3D Accleration is turned on , turn it off and check performance.
  • Folder Sharing - If enabled, disable it and see if performance changes.

If you are running any kind of third-party anti-virus software, make sure it is configured NOT to scan the folder where your virtual machines are located.

If you are using a cloud file syncing service such as OneDrive, iCloud Drive (check iCloud system preferences to see if you have it enabled , then click "Options" to see if you are allowing Desktop and Documents), or Dropbox, do NOT store your virtual machines in areas under control of these solutions. In particular, having iCloud Drive enabled and storing your virtual machine in your Documents folder is a really, really bad idea that can lead to performance problems plus virtual machine corruption.

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
ColoradoMarmot
Champion
Champion

 

You can get an external SSD and move the VM over to it, which would free up space and allow for more room to swap virtual memory - I like the SanDisk ones.  Just make sure you use USB 3.2 if you can.  It'll be a tad slower, but not much.

 

I have one of those original M1 machines myself, and it's much less capable than the later models.  If you can upgrade, you'll have a better experience.

Unfortunately, that machine is going to be really marginal to run a virtual machine these days, even on an M1.  The OS takes a lot more resources than it used to.  Win 11 guests require 2 cores, and the host really needs 2 cores (bare minimum of one) left for itself.  

 

0 Kudos
Technogeezer
Immortal
Immortal

I missed one other thing. Your VM is configured with 2GB of memory. That's really not enough for Windows 10/11. You may be forcing the VM to swap and page within itself due to insufficient memory, which is increasing the disk reads and writes on your MacBook Pro. Factor that increased I/O activity with a low amount of disk space on your Mac and I think that's a performance problem waiting to happen.

You really need to let the VM run with 4GB of memory. But you now have to watch how that impacts the memory usage of the rest of the Mac.  The Activity Monitor utility in macOS is your friend here. Open it, and select the Memory tab. Of interest is the "Memory Pressure" graph. Here's an example from my system:

Technogeezer_0-1663710300142.png

If that graph goes into the red zone, the Mac is trying to use too much memory at the same time and this will be evident by performance issues. There are only two ways to fix that: either stop using as much memory (quitting programs that you don't need or reducing the configured memory of the VM), or increase the amount of memory in your Mac (which you can't do in your Mac model).

 

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
wila
Immortal
Immortal


@Technogeezer wrote:

You really need to let the VM run with 4GB of memory.


Not with the current free disk space restraints. The moment the VM is booted they will run out of free disk space with the VM risking to end up getting corrupted.

Remember that VMware Fusion will create a memory backed file and with a 4GB memory backed file they will have problems.

So don't follow this particular suggestion until you actually have sufficient free disk space (eg. AFTER moving the VM to an external disk)

--
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
stanna
Contributor
Contributor

I am not running any time machine back ups on my laptop nor am I storing any VM related files on one drive to iCloud.

So in short I need to move Fusion to an external disk. I take it that Windows will also need to be moved onto the same drive?

0 Kudos
stanna
Contributor
Contributor

Is there a guide I can follow to move VM to an external disk. What do I do with the Windows software?

0 Kudos
RDPetruska
Leadership
Leadership

No, you do not need to move Fusion (the application) to an external disk.  You need to move your guest virtual machine(s) to an external disk.  These are treated like documents to your host computer.  Simply ensure the guest is shut down and powered off (not suspended), and close Fusion.  Then browse to the VM folder, and simply move the entire folder to a different drive.  Launch Fusion again, and select 'Open an existing virtual machine', browse to the new location and select it.

0 Kudos
stanna
Contributor
Contributor

Thank you so much. Because I am a complete novice at this, which files am I moving across? How do I shut down Fusion (can only seem to suspend it)?

0 Kudos
wila
Immortal
Immortal

You shut down your virtual machine (VM) and close VMware Fusion.

eg.

To shut down your virtual machine from the menu choose "Virtual Machine" -> "Shut down"
If that doesn't work, you can use shut down from within your virtual machine (Windows menu -> Power Button -> Shut down)

In order to locate your virtual machine. Go to Library (Fusion menu -> Window -> Virtual Machine Library) Then locate your virtual machine from the left menu, right click -> Show in Finder.
This points to the Virtual Machine "bundle".

Now close VMware Fusion.

To close VMware Fusion.
Choose menu VMware Fusion -> Quit VMware Fusion.

Go back to Finder.
Attach the external disk

Drag the virtual machine bundle to the external disk.

While dragging, hold down the command key to change from copy (The green "+" icon) to move.

Drop the virtual machine bundle to the external disk.

Now start VMware Fusion again and use File -> Open and point it to the external disk virtual machine bundle.

On startup of the virtual machine you will get a question "Did you move or copy the virtual machine".
Answer "Move" (even if you choose copy above instead of move).

That's it!

Good luck.
--
Wil

edit: Oh and make sure your external disk has enough free space before you move the VM! (A good 60GB or more would be preferable) Also make sure that the external disk is reliable as you probably have only one copy of this Virtual machine.

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

Thank you so much. I will try this and see how I go. You have been really helpful!

0 Kudos
ColoradoMarmot
Champion
Champion

Here's the model of external SSD I use - have been very happy with both performance and reliability.

Some of the cut rate ones have a small cache (buffer) of fast storage that runs out.  These maintain their speed.

 

https://www.storagereview.com/review/sandisk-extreme-portable-ssd-v2-review

0 Kudos
stanna
Contributor
Contributor

Thank you!

0 Kudos