VMWare fusion - inefficient allocation of files?

Discussion in 'Mac Applications and Mac App Store' started by chapmac, Jan 12, 2011.

  1. macrumors member

    Joined:
    Dec 30, 2007
    Location:
    UK
    #1
    I use VMware Fusion (3.1.2) to run a Windows XP VM on my 2007 Macbook. Quite recently I was running short of disk space and was looking through my files to see where I could release some space. I was amazed to find that my virtual machine was taking up 33Gb on the disk.

    When you create an XP virtual machine, VMware will not let you allocate a disk size of less than 40Gb. I had assumed however that it would only take up space that it required.
    Although I use the VM everyday there is very little change to it. I simply have a standard XP installation along with a copy of Office 2007 pro installed and that is it. I do not keep any data files on the VM, preferring to keep them in OSX for ease of backup. Therefore, there is very little ‘write’ activity within the VM – just opening programs and reading files, and saving of work is done on to the OSX disk via the VM.

    A search around indicated that I could release some of the space by performing a normal disk defrag within XP and then using the ‘shrink’ option in VMware tools. I did this and the VM size reduced to 12Gb. Still larger than I would expect but at least it gave me back 21Gb. Great, I though. I checked again about 4 weeks later and discovered the VM had grown again to 21Gb. I repeated the process and this time the VM reduced to 15Gb. During this time the only activity had been my normal daily use and downloading and installing some XP updates. Now 4 weeks on again the VM has grown to nearly 19Gb. For info I have around 23Gb free on a 250Gb drive, 4Gb of RAM with 768Mb allocated to XP – I rarely see any page outs.

    If this was a windows machine I wouldn’t expect to see the same level of growth, so this appears to me to be VMware inefficiently allocating data to VMDK files within the virtual machine, but to all you VM gurus out there I have two questions….

    1. Can anyone give me a good explanation as to what’s occurring and how I might be able to stop the growth?
    2. In the coming months I am planning to migrate to the next gen MBP or an MBA with a smaller SSD so space will be more of an issue. Do parallels or Virtual Box manage their space better?

    Thanks for any replies,

    D.
     
  2. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
    As I understand it there is a trade off between the size of the dynamically sized VMDK and performance. Having more room than minimally necessary (IIRC about a 50% overhead) lets it do its stuff better than not.

    Look at it the other way. A "regular" 40 GB XP install would take 40 GB, so VMWare is actually being quite frugal at ~20-30 GB.

    Probably the best way around this is to ignore the wizards and create your own fixed size <40GB VMDK manually, install XP to that manually.

    B
     
  3. thread starter macrumors member

    Joined:
    Dec 30, 2007
    Location:
    UK
    #3
    Thanks balalmw,

    Hadn't actually thought that this might be working as designed. I guess for improved performance it might be a hit I'll have to take. Pity it requires such a large storage overhead. Might have a look at trying to manually allocate the size of the VM.

    Dom.
     
  4. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
  5. macrumors newbie

    Joined:
    Sep 2, 2013
    Location:
    Halutz, Western Galilee, Israel
    #5
    Thanks Chapmac - I successfully used your approach

    Chapmac, thanks for posting the detailed description of your solution.
    I was able to shrink my vmware disk down to 21GB, which for me was plenty.
     
  6. macrumors G3

    Joined:
    Jul 23, 2002
    Location:
    Sol III - Terra
    #6
    1. Have you tried using Disk Cleanup to remove old temp files and other files that are no longer needed? You might try using WinDirStat to see where your disk space is going in the VM?
    2. The same thing happens in Parallels at least to some extent. It depends on why you VM size keeps growing.
    Edit: And I just realized that someone brought this thread back to life and I replied to an old problem. Hopefully my WinDirStat suggestion helps someone who has an issue in the future.
     

Share This Page