vCenter

 View Only
  • 1.  Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Sep 19, 2017 04:29 AM

    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



  • 2.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?
    Best Answer

    Posted Sep 19, 2017 06:07 AM

    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.



  • 3.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Mar 22, 2018 10:05 AM

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



  • 4.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Mar 22, 2018 10:13 AM

    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.



  • 5.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Mar 22, 2018 03:43 PM

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



  • 6.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted May 25, 2018 07:37 AM

    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



  • 7.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Aug 07, 2020 08:27 PM

    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.



  • 8.  RE: Best way to shrink a VMDK file (D Drive) of a VM ?

    Posted Nov 22, 2023 03:25 PM
    How to reduce the disk size on OS level:-

    > Login OS by using RDP.
    > Press (windows+ R) RUN and type diskmgmt.msc
    > It will redirect to disk managment console.
    > There, click properties on required disk and shrink the space how much we want.
    > You will get unallocated space which shrinked space.