VMware vSphere

 View Only
  • 1.  Reducing the size of a vmdk file

    Posted Sep 23, 2019 08:47 AM

    A Windows VM hosted by a VMware ESXI 6.5 (member of a vSphere 6.5 infrastructure) has a VMDK disk whose size is 400 GB and whose format is thin.

    The VMDK disk contains a partition whose size is 200 GB.

    How can I reduce the size of the VMDK disk to, let's say, 300 GB?

    Regards

    marius



  • 2.  RE: Reducing the size of a vmdk file

    Broadcom Employee
    Posted Sep 23, 2019 09:21 AM

    you can't just change the size of the VMDK, if you want to decrease the virtual disk size only thing that is supported is using VMware Converter, which basically means you create a second VM with a new disk size.



  • 3.  RE: Reducing the size of a vmdk file

    Posted Sep 23, 2019 10:01 AM

    Hello,

    Based on my experience and specially with VMware, technicalyyou can shrink the disk through a specific process but really this mission is very critical.

    And as mentioned by my colleagues the recommended/safe way is to use VMware Converter.



  • 4.  RE: Reducing the size of a vmdk file

    Posted Sep 23, 2019 11:11 AM

    Many thanks for the answers.

    I made a test with VMware Converter with another (similar) VM but I found some critical issues:

    • The disks were resized correctly
    • The cloned VM got a random IP adress (by the way, the IP of another VM in the same infrastructure...)
    • The cloned VM lose its Windows activation, so I had to re-activate it
    • I suspect that there are other problems I don't see

    Given that there is no other solution, is there any way to ensure that the cloned VM is as similar as possible to the original one?

    Regards

    marius



  • 5.  RE: Reducing the size of a vmdk file

    Posted Sep 23, 2019 02:52 PM

    When you need to reduce the size of a VMDK with Converter you only run Converter against the vmdk - that means you pretend to convert the VM but actually throw away the new vmx-file and just replace the resized vmdk.

    The problems you mentioned are the typical result of using Converter but then NOT discarding the new vmx-file.

    How to use dd to work with VMDKs stored on VMFS | VM-Sickbay

    That page I wrote recently shows how to cut a vmdk from cli - make sure you dont  use that approach if you dont match the start conditiions !!!!



  • 6.  RE: Reducing the size of a vmdk file

    Posted Sep 23, 2019 05:44 PM

    Please see my answer in your other discussion with the same question Re: Shrinking disks

    André