VMware Communities
danwarne
Contributor
Contributor
Jump to solution

Problem with VMDK disk size

I've been struggling with expanding a Windows 7 virtual machine VMDK, previously migrated from Boot Camp to VMWare and running in Fusion 8.5.6 on OS X 10.12.4. Snapshots are disabled and the VMDK is not set to pre-allocated space. The physical Mac has a 1TB SSD with 200+GB free.

In the Mac file system, the physical VMDK is 56.42GB.

Screen Shot 2017-05-17 at 12.21.29 pm.jpg

However, in VMware the disk size is shown as 705GB.

Screen Shot 2017-05-17 at 12.23.03 pm.jpg

If I try to shrink it down, VMWare  reports the virtual disk can't be shrunk smaller than 705GB.


Screen Shot 2017-05-17 at 12.23.09 pm.jpg

In the virtual machine itself the disk partitioning is a bit odd...

Screen Shot 2017-05-17 at 12.16.53 pm.jpg

Windows sees a 649 GB partition and a 55.67 NTFS primary partition.

I'm not sure whether I can just change the partition structure in Windows - and whether that could affect data outside the virtual machine (I assume not though, given surely partitioning is sandboxed to within the VMDK).

My problem is that although the VMDK is not a preallocated size, VMWare doesn't seem to be dynamically expanding the size of the Windows partition. I can manually expand it by sliding the slider to the right -- beyond the 705GB -- in which case VMWare adds the incremental GB onto the size of the VMDK. However, this behaviour seems to be acting more like a preallocated size VMDK.

The vmware-vdiskmanager command line tool fails when I try to expand the size of the VMDK.

Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -x 60GB /Users/danwarne/Documents/Boot\ Camp\ \(Imported\).vmwarevm/Boot\ Camp.vmdk  

Failed to expand the disk '/Users/danwarne/Documents/Boot Camp (Imported).vmwarevm/Boot Camp.vmdk': One of the parameters supplied is invalid (0x3e80).

Permissions on the VMDK are:

Screen Shot 2017-05-17 at 3.15.08 pm.jpg

Anyone have any idea what is going wrong here?

1 Solution

Accepted Solutions
wila
Immortal
Immortal
Jump to solution

Hi Dan,

Nothing is wrong, what you are seeing is actually expected.

Let me try to explain.

When you create your boot camp machine, you get a partition in a larger disk structure which is matching with what you see in your virtual machine.

The moment you decide to import your  boot camp machine and only use it as a virtual machine, that particular partition structure from the boot camp setup is kept.

It does not change over to a single partition disk.

Shrinking a disk is supported, but it means something else as what you would expect, it does not mean that you can change the total disk size to something smaller.

Changing your disk size to something larger is supported, changing it to smaller is not as then the partition sizes would have to adjust accordingly and Fusion does not do that.

Shrinking in VMware parlance means to release the disk space at the host OS in use by empty space on your guest disk partition.

Shrinking only supports certain partition types such as ntfs.

So what to do?

You can indeed use a partitioning tool to resize the partition to use the full disk, then shrink and the total disk size your VM occupies on the host OS should go down to what it is using in the guest OS (Assuming your disk is set to not pre-allocate disk space and you do not have snapshots open)

Another solution that allows you to actually resize the partition to something smaller is to use VMware Converter

Download VMware vCenter Converter Standalone for P2V Conversion

With Converter you can migrate your VM to what you are looking for without the use of any 3rd party tools.

--

Wil

edit: the link above is now dead, instead use this one: vCenter Converter: P2V Virtual Machine Converter | VMware

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

View solution in original post

6 Replies
wila
Immortal
Immortal
Jump to solution

Hi Dan,

Nothing is wrong, what you are seeing is actually expected.

Let me try to explain.

When you create your boot camp machine, you get a partition in a larger disk structure which is matching with what you see in your virtual machine.

The moment you decide to import your  boot camp machine and only use it as a virtual machine, that particular partition structure from the boot camp setup is kept.

It does not change over to a single partition disk.

Shrinking a disk is supported, but it means something else as what you would expect, it does not mean that you can change the total disk size to something smaller.

Changing your disk size to something larger is supported, changing it to smaller is not as then the partition sizes would have to adjust accordingly and Fusion does not do that.

Shrinking in VMware parlance means to release the disk space at the host OS in use by empty space on your guest disk partition.

Shrinking only supports certain partition types such as ntfs.

So what to do?

You can indeed use a partitioning tool to resize the partition to use the full disk, then shrink and the total disk size your VM occupies on the host OS should go down to what it is using in the guest OS (Assuming your disk is set to not pre-allocate disk space and you do not have snapshots open)

Another solution that allows you to actually resize the partition to something smaller is to use VMware Converter

Download VMware vCenter Converter Standalone for P2V Conversion

With Converter you can migrate your VM to what you are looking for without the use of any 3rd party tools.

--

Wil

edit: the link above is now dead, instead use this one: vCenter Converter: P2V Virtual Machine Converter | VMware

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
danwarne
Contributor
Contributor
Jump to solution

Thank you so much for taking the time to explain all that Wila - greatly appreciated!!!

0 Kudos
wila
Immortal
Immortal
Jump to solution

You are welcome.

If you have any more questions about VMware Fusion, then just ask and me (or somebody else) will try to answer them.

--

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
stefat
Contributor
Contributor
Jump to solution

Hello,

I got a similar issue using Vmware Fusion 11.0.3 using a W10 vm copied from bootcamp.

I already removed a couple of unused partitions using W10 disk manager and the result is as per the attached image.

Now I cannot remove the GPT partition on disk 0, 200Mb only, then the vm shows 465,76Gb and I cannot establish a single partition on virtual disk for W10.

My aim is getting a single partition disk enabling shrinking and enlarging the W10 partition from VMWare settings.

Is there a solution ?

Thank you for any help.

Stefano

0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi Stefano,


The answer is pretty much the same: use the converter.

However I noticed that the link above was broken, so have updated the reply with the current link to the download.

--

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
stefat
Contributor
Contributor
Jump to solution

Thank you.

I will do that.

Stefano

0 Kudos