VMware Communities
mihalco
Contributor
Contributor
Jump to solution

Is there ANY way to shrink a virtual disk in Fusion 3.1.1

I brought over a Windows XP machine using the migration tool (Fusion 3.1.1) to the Mac, and it runs fine. However, the XP machine had a 750GB drive with only 135GB used, and the process still resulted in a virtual disk of 698 GB (about 160GB on the Mac filesystem). My Mac only has a 500GB drive, and although not currently an issue, I didn't want to allow the virtual disk to grow unbounded. So, using the EASYUS partition tool, I reduced the XP partition size in the VM to 160GB. This resulted in my virtual disk growing from about 160GB to 220GB on the Mac. I then ran the VMware tools on the XP VM to shrink the virtual disk, which ran fine, and wound up with the virtual disk growing from 220GB to 240GB on the Mac. Not exactly what I would expect. Is there any tools I can load on the Mac to clean this up? Seems kind of silly to have a 240GB file housing a 160GB XP partition. The virtual disk is set up as a single file (not 2GB strips), and is NOT pre-allocated. Any advice? FWIW, I've already torn up the original machine, so I can't repartition it and re-import it.

Thanks,

Kurt

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ChipMcK
Hot Shot
Hot Shot
Jump to solution

Starting with the vm shutdown, . . .

1) Settings: add 2nd Hard Drive of smaller size

2) Boot up the vm

3) Partition the "new" drive

4) Copy/Paste the XP partition and mark as bootable; note that your partitioning program needs to be able to cope via copying from the partition that is the current boot drive and that EASEUS and others handle this quite well.

5) Shutdown, not suspend

6) Settings: Delete all hard drives, but do keep the files.

7) Settings: add again that 2nd hard drive of the smaller size, noting that it is now the Primary Master

😎 Settings: add again the former boot drive, noting that it is now the Primary Slave

9) Boot again with the smaller hard drive

This is not much different than the "real hardware" steps.

Message was re-edited by: ChipMcK to compliment EASEUS on their foresight

View solution in original post

0 Kudos
14 Replies
ChipMcK
Hot Shot
Hot Shot
Jump to solution

One method is to copy/paste the XP partition to a smaller virtual disk.

Since most copy/paste do not replicate the partition's flags, remember to flag it as bootable.

Best!

0 Kudos
continuum
Immortal
Immortal
Jump to solution

you must also shrink the empty space at the end of the drive.

that is only possible if you first create a partition on it - format it and run shrink again.

when done you can delete the partition again




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

mihalco
Contributor
Contributor
Jump to solution

you must also shrink the empty space at the end of the drive.

that is only possible if you first create a partition on it - format it and run shrink again.

when done you can delete the partition again

>_________________________

That's what I wound up doing. I created a new partition that filled the remaining part of the virtual disk, ran sdelete -c, deleted the partition, and re-shrunk. Went back to about 135GB used. Since the XP partition is limited to 160GB, I don't think it matters that the virtual disk is larger (698GB), since XP can't grow past the 160GB limit.

Still, it seems odd that Fusion/VMware won't allow you to shrink the virtual disk size to the max size of the partitions in it. This would allow me to pre-allocate the virtual disk for the 160GB XP partition. With a 698GB virtual disk, this isn't possible.

0 Kudos
mihalco
Contributor
Contributor
Jump to solution

One method is to copy/paste the XP partition to a smaller virtual disk.

Since most copy/paste do not replicate the partition's flags, remember to flag it as bootable.

Best!

Sounds interesting. I'm unsure of the sequence here. Do you mean add a second virtual disk to the XP vm with Fusion, boot the XP vm and partition the new disk (drive E:), Copy and Paste drive C: to E:, shutdown, delete the original virtual disk (do this in Fusion or Finder?). Will the new virtual disk revert to drive C: when the vm is re-booted?

Thanks,

Kurt

0 Kudos
ChipMcK
Hot Shot
Hot Shot
Jump to solution

Starting with the vm shutdown, . . .

1) Settings: add 2nd Hard Drive of smaller size

2) Boot up the vm

3) Partition the "new" drive

4) Copy/Paste the XP partition and mark as bootable; note that your partitioning program needs to be able to cope via copying from the partition that is the current boot drive and that EASEUS and others handle this quite well.

5) Shutdown, not suspend

6) Settings: Delete all hard drives, but do keep the files.

7) Settings: add again that 2nd hard drive of the smaller size, noting that it is now the Primary Master

😎 Settings: add again the former boot drive, noting that it is now the Primary Slave

9) Boot again with the smaller hard drive

This is not much different than the "real hardware" steps.

Message was re-edited by: ChipMcK to compliment EASEUS on their foresight

0 Kudos
continuum
Immortal
Immortal
Jump to solution

you must explain your step 4 - otherwise every one will think "what the heck is this guy talking about ... sound s like complete nonsense Smiley Wink

I have done similar things with robocopy - but you make it sounds easier then it is 😉




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
ChipMcK
Hot Shot
Hot Shot
Jump to solution

Most of today's GUI programs that do partitioning have Copy/Paste capability, some better than others; EASEUS is one of these. Three/two years ago that was not the case. Some nudging was used to up-the-playing-field.

Message was edited by: ChipMcK

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

I have to agree with continuum because the way your steps read I can see very quickly how someone who does not totally understand what really has to be done is going to fail.

As an example you cannot do a simple copy and paste of the volume that Windows XP is running from as some files will be in use and will not copy and the way your steps are written it leads one to believe they can add the second drive and boot Windows XP normally and after partitioning/formatting the second hard drive just go into Windows Explore and copy and paste the contents of C: to E: assuming the new hard drive has been assigned E:.

This method will outright fail!

You need to boot the Virtual Machine by other means so that the source is not in use as in the Windows XP installed on that drive is not actively running and is just sitting there available to preform a copy and paste otherwise you have to be using the same technology that programs like VMware vCenter Converter Standalone does by utilizing VSS.

0 Kudos
ChipMcK
Hot Shot
Hot Shot
Jump to solution

Considering that today's GUI partitioning programs are aware of 'cant-copy-from-boot-partition' and overcame it years ago,

. . .

0 Kudos
ChipMcK
Hot Shot
Hot Shot
Jump to solution

I take the silence to mean that the nay-sayers are satisfied that the directions are valid.

Happy next holiday!

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

I take the silence to mean that the nay-sayers are satisfied that the directions are valid.

Your assumption, with me anyway, is not correct and I've just not had time to reply nor do I have time to elaborate and the case use scenario I previously presented toward your original set of steps is/was a valid point of failure. Even after you edited the original steps I still find issue in that they're okay as a very general outline however most users needing help in this area require more explicit and specific directions to accomplish such a task.

You still get an A for effort though. Smiley Wink

0 Kudos
continuum
Immortal
Immortal
Jump to solution

wow - a rare case Smiley Wink

I completely agree with Woody

!http://sanbarrow.com/gifs/cheers.gif!




_________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
ChipMcK
Hot Shot
Hot Shot
Jump to solution

Using either

1. Partition Manager Software for Windows 32-bit & 64 bit http://www.partitionwizard.com/free-partition-manager.html

or

2. EASEUS Partition Tool 32bit/64bit http://www.partition-tool.com/ (refer to original post by mihalco),

the steps are valid as both products cope with the 'copy-from-boot-partition' issue.

0 Kudos
mihalco
Contributor
Contributor
Jump to solution

I take the silence to mean that the nay-sayers are satisfied that the directions are valid.

Happy next holiday!

After a backup, I tried this, and the method works great (as a general guide - not verbatim)! I agree with the comments that you should be comfortable using disk cloning tools before attempting this. I wound up using a bootable CD of Easy Gig cloning software that came with the DriveWire USB to IDE/SATA adapter from Apricorn (I think this is a re-packaged version of the bootable Acronis cloning tool). I did change the sequence somewhat, as I had to set Fusion to boot from the CD to start the cloning software, and I let the cloning software partition the new virtual drive. It handled cloning from the original partition to the new "full disk" (160GB) partition on the new virtual drive just fine. Thanks everyone - learned a bunch about Fusion & VMware.

0 Kudos