Highlighted
Enthusiast
Enthusiast

Best way to shrink a VMDK file (D Drive) of a VM ?

Jump to solution

Hi,


We are running ESXi 6 Update 3.

There is a VM running Windows 2012R2 that consists of 2 HDD (2 Separate VMDK files).

 

We would like to shrink the D Drive (i.e. The second VMDK file) from 500GB to 100GB.

 

We would like to know what is the best way to shrink it ?  Would it be a V2V of that VM OR can we just V2V for a particular VMDK file ?

Thanks

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Virtuoso
Virtuoso

1. Login to the Virtual Machine and shrink the Partition you want at windows level with disk management.

2. Reducing the size of the VMware Virtual Machine Disk (VMDK) with desctripter file on esxi host.

Detailed steps Shrink a VMware Virtual Machine Disk (VMDK) – virtualman

V2V has its own pros and cons, check in above link and its on you which way you want to do with.

View solution in original post

6 Replies
Highlighted
Virtuoso
Virtuoso

1. Login to the Virtual Machine and shrink the Partition you want at windows level with disk management.

2. Reducing the size of the VMware Virtual Machine Disk (VMDK) with desctripter file on esxi host.

Detailed steps Shrink a VMware Virtual Machine Disk (VMDK) – virtualman

V2V has its own pros and cons, check in above link and its on you which way you want to do with.

View solution in original post

Highlighted
Contributor
Contributor

Almost worked for me Smiley Happy VM boots just fine but O/S never finishes loading.

Highlighted
Hot Shot
Hot Shot

Have you shrinked  the partition within Windows before you resized the VMDK? If not, you might have to roll the change back using a backup or a snapshot as lowering the size of disk without resizing the partition first in the OS might have damaged the internal OS files.

Cheers, Paul Wilk
0 Kudos
Highlighted
Contributor
Contributor

Thanks Paul, but of course I have done that prior to changing VMDK.

0 Kudos
Highlighted
Contributor
Contributor

Does the VM per chance have a "Dynamic" disk type or a logical partition? That would perhaps explain the problem - "Dynamic" disks store their partition information at the end of the device, which you've just cut off. Volumes in logical partions will be shrunk, but the logical partition itself won't shrink with it, which could also cause a problem.

Since the instructions above need some temporary space anyway, here's how I do it - I just add a new drive of the desired, smaller size to the VM. Then I shrink the volume and add a mirror to the new drive. Once that is synchronized, I break the mirror and remove the old, bigger drive. This requires conversion of "Basic" disks to "Dynamic" disks, but that hasn't been a problem for me in the past.

HTH, bye

Einhirn

Highlighted
Enthusiast
Enthusiast

after wrestling with a similar issue, for far too long (deriving from a P2V, originally badly-configured server 2012 R2 server), and working through several different methods, I eventually found success by paying $180 for casper server edition, creating a correctly-sized VMDK (120GB) and cloning the 60 GB of data from the 880GB vmdk (Dell OEM partition, recovery partition, and OS partition) to the new VMDK.  After a quick rename of the old and new VMDKs, I was booting up with the 120GB VMDK.  I estimate I spent about  10x as much in (un-)billable time as the cost of casper.

Unfortunately Casper Server Edition does not work with dynamic disks, so if you have a simple layout with already-existing dynamic disk(s), the method describe in reply 5 would probably work for you.

0 Kudos