VMware Communities
orangebanana
Contributor
Contributor
Jump to solution

shrink virtual hard disk (Mac OS X + VMware Fusion 5 + WinXP + Win7)

Hello there!

First of all, I use the German version of VMware Fusion 5. So if you encounter any weird words I used, sorry for that but I couldn't find a way to contact the German support (if specific support exists at all).

Today I installed VMware Fusion 5 on my Macbook and updated it to the newest version. Then I installed Windows XP Professional inclusive Service Pack 3 and Windows 7 Ultimate (both in isolated environments) without using bootcamp. (The OS I am using: Mac OS 10.7.5 (Lion)) The virtual machines both run without any problems except for one: When I installed Windows XP, I had to leave 40GB of disk space to WinXP and when installing Win7, I had to leave 60GB to Win7. I don't need that much of disk space for my virtual machines though. I tried to decrease the amount of disk space left behind for WinXP and Win7 ('Settings' -> 'Harddisks' -> 'Virtual Harddisk.vmdk') but I was not able to decrease the amount of 40GB (fpr WinXP) \ 60GB (for Win7). How do I do that? I seem to be able to increase the amount, though. It just won't get lower than 40GB\60GB.

Apart from that, I noticed something strange: When I installed WinXP and left 40GB for this VM, the amount of space on my MacintoshHD went down 40GB. When I installed Win7, though, it did not go down the 60GB used for Win7. What happened here? Besides, I cannot find any data on my MacintoshHD which corresponds to the 40GB I "lost".

Then I got two more questions:

Is the amount of RAM reserved for the virtual machines temporarily unusable by Mac OS while the virtual machine is running or is it a permament reservation so that I cannot use the RAM when I only use Mac OS?

Can I use the space on a usb-stick for a virtual harddisk? If so, can I even use one virtual harddisk for WinXP and Win7? Let's say, I use a 30GB usb-stick, can I use the 30GB as a virtual harddisk that can be used by both, WinXP and Win7?

By the way, I would really like to get advice on how to fix this problem by only using VMware without any other software I would have to download. I have read some tutorials on how to fix this, but they said further software is required. I think it should be possible to do this without any other software and well, hopefully, it will work somehow.

Oh, and one more thing: If I delete a virtual machine, what is going to happen to the disk space left for the VM? Can it be used by Mac OS right away?

Many thanks in advance!

Greetings,

orangebanana

EDIT:

Also, I managed to transfer space which is "not needed" (marked yellow) by WinXP and Win7 to Mac OS. This doesn't seem to be what I'm looking for, though, because I could anly transfer about 1 or 2GB.

Reply
0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

As you walk through the New Virtual Machine Assistant you have to click Einstellungen anpassen, then click Sichern.  The Settings window will appear and you can then click the Hard Disk and change its size and then start the VM and install the OS.  If you click Fertig stellen instead of Einstellungen anpassen then you will not be able to customize the Hard Disk size before installing unless you stop the VM first! Smiley Wink

View solution in original post

Reply
0 Kudos
12 Replies
WoodyZ
Immortal
Immortal
Jump to solution

A virtual hard disk cannot be downsized once it is partitioned.  This means you can only downsize it immediately after creating the Virtual Machine itself and before installing the Guest OS.  Just about anything you can do shy of making the virtual partition smaller and thus not allowing a sparse disk to occupy the full capacity (not counting snapshots) will require the use of 3rd party utilities.  As an example if you added a smaller right-sized disk to image the contents of the original to the smaller disk and then swap the disk out this requires imaging software not a part of the installed OSes.  Even doing a V2V to get a smaller disk would require installing another product like VMware vCenter Converter Standalone in the Virtual Machine to create a new Virtual Machine from it with a smaller virtual hard disk.

As to the the Host loosing 40 GB with the creating of the Windows XP VM it sounds like you chose to pre-allocate the virtual hard disk however if you want expert analysis based on technical facts then...  To help figure out what is what, the best way to provide comprehensive diagnostic information is to use the "Collect Support Information" command from the VMware Fusion (menu bar) > Help > Collect Support Information and then attach the .tgz file it created on your Desktop to a reply post.

Message was edited by: WoodyZ - Originally posted, Mar 27, 2013 8:33 PM.

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Oh, and one more thing: If I delete a virtual machine, what is going to happen to the disk space left for the VM? Can it be used by Mac OS right away?

If you empty the Trash too then yes.

Reply
0 Kudos
orangebanana
Contributor
Contributor
Jump to solution

Thank you for your reply, WoodyZ!

What do you mean by V2V? I really don't know much about emulating.

So if I understood you right, it is possible to limit the virtual disk space before I install WinXP and Win7? If so, I could just delete the OSes and reinstall them. I haven't got any data on the virtual machines \ virtual hard disks I still need. I cannot remember any chance VMware would have given me to choose a smaller virtual disk, though, because the first time I was able to choose the amount of disk space I wasn't able to make a smaller disk either.

But even if I needed the data, it is possible to move data (e.g. photos or movies) from WinXP \ Win7 to Mac OS, right?

The .tgz-file is added. Maybe this helps at some point.

EDIT:

I found an option to "remove" the virtual hard disk (right-click on the OS listed in VMware -> settings -> hard discs -> advanced options -> remove hard disc). Might this be useful? To remove it and create a new one which is smaller?

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

V2V is Virtual to Virtual

According to info in the support bundle the two VM are currently only sin less then 10 GB Host disk space when not running.  When running an addition amount of space it temporarily used by the .vmem file for each VM in the size of the RAM allocated for each.  This is then released when shutdown, not suspended.

If all you have in the VM are the base install of the OS then it just may be easier and faster to delete the existing virtual hard disk and then add the size you want then reinstall the OS.

BTW If you make the proper choices as you walk through the New Virtual Machine Assistant you can take the opportunity to modify the virtual hardware before installing the OS.

WoodyZ
Immortal
Immortal
Jump to solution

But even if I needed the data, it is possible to move data (e.g. photos or movies) from WinXP \ Win7 to Mac OS, right?

Yes providing you do it before deleting the virtual hard disk or VM itself.

Reply
0 Kudos
orangebanana
Contributor
Contributor
Jump to solution

Thank you for helping, WoodyZ!

So if I get you right, I can use the remove-function

("I found an option to "remove" the virtual hard disk (right-click on the OS listed in VMware -> settings -> hard discs -> advanced options -> remove hard disc). Might this be useful? To remove it and create a new one which is smaller?")

and 'reinstall' the OSes without actually deleting the OSes? So basically I won't even need the WinXP \ Win7 discs to fix this? If so, how do I do that? Or will I have to delete the OSes and make a whole new copy of the Windows-files?

According to info in the support bundle the two VM are currently only sin less then 10 GB Host disk space when not running.  When running an addition amount of space it temporarily used by the .vmem file for each VM in the size of the RAM allocated for each.  This is then released when shutdown, not suspended.

This is really weird as I am currently not running any further OSes, not even VMware and the disk space is still as low as before. The virtual machines which are located in my documents-folder take about 10GB and when I say 40GB are "gone", I don't mean those 10GB. Bottom line, the whole installation of those virtual machines took 50GB of which 10GB are the virtual machines I can actually see as files and the 40GB for WinXP, whatever happened to those. The 60GB actually used for Win7 are not gone, even though. It's very confusing.

EDIT:

So basically, when it comes to RAM, the virtual machine backups the RAM in the .vmem files and the RAM itself is only used by WinXP\Win7 when its actually running? Or did I understand that wrong?

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

orangebanana wrote:

Thank you for helping, WoodyZ!

So if I get you right, I can use the remove-function

("I found an option to "remove" the virtual hard disk (right-click on the OS listed in VMware -> settings -> hard discs -> advanced options -> remove hard disc). Might this be useful? To remove it and create a new one which is smaller?")

and 'reinstall' the OSes without actually deleting the OSes? So basically I won't even need the WinXP \ Win7 discs to fix this? If so, how do I do that? Or will I have to delete the OSes and make a whole new copy of the Windows-files?

If you delete the existing virtual hard disks and empty the Trash the installed OS are gone and you have no choice but to reinstall using the installation media.  The other option if you want to use what's already installed but transfer it to a smaller disk requires imaging software and then swap out the disks however you said you didn't want to have to use other software so just delete the VM and start over setting the size of the virtual hard disk before starting the install and be done with this! Smiley Wink

According to info in the support bundle the two VM are currently only sin less then 10 GB Host disk space when not running.  When running an addition amount of space it temporarily used by the .vmem file for each VM in the size of the RAM allocated for each.  This is then released when shutdown, not suspended.

This is really weird as I am currently not running any further OSes, not even VMware and the disk space is still as low as before. The virtual machines which are located in my documents-folder take about 10GB and when I say 40GB are "gone", I don't mean those 10GB. Bottom line, the whole installation of those virtual machines took 50GB of which 10GB are the virtual machines I can actually see as files and the 40GB for WinXP, whatever happened to those. The 60GB actually used for Win7 are not gone, even though. It's very confusing.

The size of the non pre-allocated disk is not how much space it initially takes on the Host's Filesystem and even though between the two VM they are 100 GB for the two virtual hard disks they currently take up less then 10 GB when not running and an additional 2.5 GB for the two .vmem files when running so whatever other Host disk space you're missing it has nothing to do with these two VM's at the moment.

EDIT:

So basically, when it comes to RAM, the virtual machine backups the RAM in the .vmem files and the RAM itself is only used by WinXP\Win7 when its actually running? Or did I understand that wrong?

Yes that's correct and when the VM is shutdown, not suspended, the disk space released as the file is deleted.  The RAM becomes accessible to the Host when the Virtual Machine is not running.

orangebanana
Contributor
Contributor
Jump to solution

WoodyZ schrieb:

orangebanana wrote:

Thank you for helping, WoodyZ!

So if I get you right, I can use the remove-function

("I found an option to "remove" the virtual hard disk (right-click on the OS listed in VMware -> settings -> hard discs -> advanced options -> remove hard disc). Might this be useful? To remove it and create a new one which is smaller?")

and 'reinstall' the OSes without actually deleting the OSes? So basically I won't even need the WinXP \ Win7 discs to fix this? If so, how do I do that? Or will I have to delete the OSes and make a whole new copy of the Windows-files?

If you delete the existing virtual hard disks and empty the Trash the installed OS are gone and you have no choice but to reinstall using the installation media.  The other option if you want to use what's already installed but transfer it to a smaller disk requires imaging software and then swap out the disks however you said you didn't want to have to use other software so just delete the VM and start over setting the size of the virtual hard disk before starting the install and be done with this! Smiley Wink

Alright then, I am going to start this now and tell you if it worked later. It's 3:30 am :smileygrin:.

According to info in the support bundle the two VM are currently only sin less then 10 GB Host disk space when not running.  When running an addition amount of space it temporarily used by the .vmem file for each VM in the size of the RAM allocated for each.  This is then released when shutdown, not suspended.

This is really weird as I am currently not running any further OSes, not even VMware and the disk space is still as low as before. The virtual machines which are located in my documents-folder take about 10GB and when I say 40GB are "gone", I don't mean those 10GB. Bottom line, the whole installation of those virtual machines took 50GB of which 10GB are the virtual machines I can actually see as files and the 40GB for WinXP, whatever happened to those. The 60GB actually used for Win7 are not gone, even though. It's very confusing.

The size of the non pre-allocated disk is not how much space it initially takes on the Host's Filesystem and even though between the two VM they are 100 GB for the two virtual hard disks they currently take up less then 10 GB when not running and an additional 2.5 GB for the two .vmem files when running so whatever other Host disk space you're missing it has nothing to do with these two VM's at the moment.

I don't really understand that. Or maybe I do? Mac OS does not use the information that the virtual hard drives actually "take space" 40GB\60GB? So this really is all about actual files "being there" and not about VMware creating a boarder around the virtual hard disks so that the space can't be used by Mac OS anymore? So basically, the 40GB "loss" has to be caused by something else but VMware\windows-installations? Well, at least I just found out that deleting the OSes installed in VMware Fusion won't bring back the 40GB.

EDIT:

So basically, when it comes to RAM, the virtual machine backups the RAM in the .vmem files and the RAM itself is only used by WinXP\Win7 when its actually running? Or did I understand that wrong?

Yes that's correct and when the VM is shutdown, not suspended, the disk space released as the file is deleted.  The RAM becomes accessible to the Host when the Virtual Machine is not running.

Thanks again for your help!

EDIT:

Well, I tried restarting the whole process of installing WinXP but the same will happen. It won't let me change the settings (40GB of disk space and 510MB of RAM). The only thing I can change is the location of the virtual machine. I added two screenshots of the windows showing this step of installation.

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

As you walk through the New Virtual Machine Assistant you have to click Einstellungen anpassen, then click Sichern.  The Settings window will appear and you can then click the Hard Disk and change its size and then start the VM and install the OS.  If you click Fertig stellen instead of Einstellungen anpassen then you will not be able to customize the Hard Disk size before installing unless you stop the VM first! Smiley Wink

Reply
0 Kudos
orangebanana
Contributor
Contributor
Jump to solution

Thank you very much for helping me! The whole setup worked nicely now! I was able to create a 20GB hard disk. It's a very tricky installation if you want to create a smaller disk than the default one. :smileygrin:

I'd just like to know if I understand the whole procedure correctly.

If, for example, the whole situation is like this:

free disk space on Macintosh HD: 200GB

used disk space

on WinXP virtual disk: 10GB (of 20GB)

on Win7 virtual disk: 20GB (of 30GB)

Then I will be able to use 170GB on MacintoshHD, right? Even though the virtual disks are 20GB and 30GB 'big'.

If so, will I be able to delete files from the virtual disks and use the gained space in Mac OS? Let's say my virtual disk of 20GB is full and I delete 10GB of data, will there be 10GB more space on the MacintoshHD?

Hopefully I understand this now :smileygrin: Because if I do, it's not too complicated at all.

The only thing still left unclear is that I really don't know what happened to the 40GB missing. After reinstalling WinXP with a 20GB virtual hard disk I did not lose any further disk space except the place the virtual machine itself uses. Even after I tried deleting it again and installing it for the 3rd time, there was no further Macintosh HD space missing. I guess these 40GB must have been used by something else.

EDIT:

I also got one more question there: When it comes to RAM, I can change the amount after installing the guest OS, right? Let's say WinXP may use 512MB and once in a while when I need more, will I be able to increase the amount of RAM WinXP may use?

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

It's a very tricky installation if you want to create a smaller disk than the default one.

I have to disagree with that statement!  IMO many Users just are not paying attention and or just outright do not read the product documentation before using it much less when they run into issues.

Case in point...  One is at the Finish dialog box and as a example it plainly and succinctly says "To change the default virtual machine settings, click Customize Settings. To start the installation of Microsoft Windows now, click Finish." or translated (Um die Standardeinstellungen der virtuellen Maschine zu ändern, klicken Sie auf "Anpassen Einstellungen". Wenn Sie die Installation von Microsoft Windows jetzt starten möchten, klicken Sie auf "Fertig stellen".) so what is not understandable about a blatantly obvious statement and a Customize Settings button, the largest button there, that is centered in the lower portion of that window above the other control buttons? Smiley Happy

So I think it's quite fair to say a User was just not paying attention to what he/she was doing in situations like this! Smiley Wink  It takes but a few extra clicks and key strokes and should take less then a minute to make some customizations.  Really absolutely nothing tricky whatsoever about it! Smiley Wink

I'd just like to know if I understand the whole procedure correctly.

If, for example, the whole situation is like this:

free disk space on Macintosh HD: 200GB

used disk space

on WinXP virtual disk: 10GB (of 20GB)

on Win7 virtual disk: 20GB (of 30GB)

Then I will be able to use 170GB on MacintoshHD, right? Even though the virtual disks are 20GB and 30GB 'big'.

If so, will I be able to delete files from the virtual disks and use the gained space in Mac OS? Let's say my virtual disk of 20GB is full and I delete 10GB of data, will there be 10GB more space on the MacintoshHD?

Hopefully I understand this now :smileygrin: Because if I do, it's not too complicated at all.

Yes, of course you can use whatever free space exists on the Host's Filesystem however keep in mind that the amount of space the files that comprise the virtual hard disk will continue to grow as necessary thus reducing the amount of free space on the Host's Filesystem.  So you need to be cognizant of this, that the virtual disk can/will grow in size up to the defined size and also that as you use the Snapshot feature the Virtual Machine Package itself can grow to many times larger then the defined size of the virtual hard disk.

As you delete objects from with the Virtual Machine Guest OS Filesystem the space taken up on the Host's Filesystem is not automatically given back and you'll need to preform routine maintenance from time to time.  Have a look at: Clean Up a Virtual Hard Disk

The only thing still left unclear is that I really don't know what happened to the 40GB missing. After reinstalling WinXP with a 20GB virtual hard disk I did not lose any further disk space except the place the virtual machine itself uses. Even after I tried deleting it again and installing it for the 3rd time, there was no further Macintosh HD space missing. I guess these 40GB must have been used by something else.

Sometimes looking a the contents of the Macintosh HD from a graphical perspective can help understand what may be taking up space appropriately or something unwanted or no longer needed etc. and to that end using a program like like Disk Inventory X or GrandPerspective can help put things in proper perspective and help to remove the unwanted or no longer needed content.  On a cautionary note though, do not delete anything that your not sure of that your deleting! Smiley Wink

EDIT:

I also got one more question there: When it comes to RAM, I can change the amount after installing the guest OS, right? Let's say WinXP may use 512MB and once in a while when I need more, will I be able to increase the amount of RAM WinXP may use?

Yes while the Virtual Machine's Guest OS is shutdown, not suspended, the amount of RAM may be adjusted up/down as one desires.

Reply
0 Kudos
orangebanana
Contributor
Contributor
Jump to solution

Thank you, WoodyZ! You really helped me alot there!

Well, about that "very tricky installation" statement: I was confused by the window popping up at first because when I clicked on the customize settings, I could only change the directory of the virtual machine and wasn't aware that the other settings like the space the virtual disk is going to take could be changed after choosing the directory so I thought the only thing one could choose is the directory. :smileygrin:

Also, GrandPerspective really is a great program. I've already been using it and it's a lot easier to manage the whole disk space.

Reply
0 Kudos