VMware vSphere

 View Only
  • 1.  Shrink VMDK File

    Posted Jun 07, 2019 05:11 AM

    Hi there,

    currently i have a VM called kemit which has a bunch of vdmk files. see below.

    I want to shrink the vm using  vmkfstools -K [disk].

    But which of this files are the right one?

    I tried already this:

    kermit.vmdk

    kermit-000001.vmdk

    but i got always

    Couldn't find VMFS handle on virtual disk 'kermit.vmdk'

    Couldn't find VMFS handle on virtual disk 'kermit-000001.vmdk'

    kermit-000001-s001.vmdk

    kermit-000001-s002.vmdk     

    kermit-000001-s003.vmdk     

    kermit-000001-s004.vmdk     

    kermit-000001-s005.vmdk     

    kermit-000001-s006.vmdk     

    kermit-000001-s007.vmdk     

    kermit-000001-s008.vmdk     

    kermit-000001-s009.vmdk     

    kermit-000001-s010.vmdk     

    kermit-000001-s011.vmdk     

    kermit-000001-s012.vmdk     

    kermit-000001-s013.vmdk     

    kermit-000001-s014.vmdk     

    kermit-000001-s015.vmdk     

    kermit-000001-s016.vmdk     

    kermit-000001-s017.vmdk     

    kermit-000001-s018.vmdk     

    kermit-000001-s025.vmdk

    kermit-000001-s026.vmdk

    kermit-000001-s027.vmdk

    kermit-000001-s028.vmdk

    kermit-000001-s029.vmdk

    kermit-000001-s030.vmdk

    kermit-000001-s031.vmdk

    kermit-000001-s032.vmdk

    kermit-000001.vmdk

    kermit-85de2526.vswp

    kermit-Snapshot1.vmsn

    kermit.vmdk

    kermit.vmsd

    kermit.vmx

    kermit.vmx.lck

    kermit.vmxf

    kermit.vmx~

    nvram kermit-000001-s019.vmdk     

    vmware-1.log kermit-000001-s020.vmdk     

    vmware-2.log kermit-000001-s021.vmdk     

    vmware-3.log kermit-000001-s022.vmdk     

    vmware-4.log kermit-000001-s023.vmdk     

    vmware.log kermit-000001-s024.vmdk     

    vmx-kermit-2245928230-1.vswp



  • 2.  RE: Shrink VMDK File

    Posted Jun 07, 2019 09:17 AM

    Hey,

    i think you need to do something with your Snapshots.

    The 000001-sxxx.vmdk  Files show that.

    First thing that i would do, erase all that snapshots.

    Than you will have only the 1 or 2 or xx many .vmdk that your VMs needs.

    BTW  be sure that u have a Backup

    Shrink a VMware Virtual Machine Disk (VMDK) – virtualman

    https://www.experts-exchange.com/articles/12938/HOW-TO-Shrink-a-VMware-Virtual-Machine-Disk-VMDK-in-15-minutes.html



  • 3.  RE: Shrink VMDK File
    Best Answer

    Posted Jun 07, 2019 06:47 PM

    Kermit was created on Workstation or Fusion and does not use ESXi-compatible VMDKs.

    Either shrink the vmdk on WS or Fusion or import it via

    vmkfstools -i kermit-000001.vmdk esxi-compatible.vmdk

    first.

    You do not need to read the random links provided in the previous reply.



  • 4.  RE: Shrink VMDK File

    Posted Jun 12, 2019 08:41 AM

    Hey continuum​ how do you know that this VM was made with Workstation or Fusion?

    Is there a pattern or something? I wouldt like to know how you recognize this.



  • 5.  RE: Shrink VMDK File

    Posted Jun 12, 2019 12:14 PM

    Open kermit-000001.vmdk in a texteditor and you will see how I identified the vmdk-format.

    ESXi-compatible snapshots only use one binary file - that file would use the name blabla-delta.vmdk or blabla-sesparse.vmdk.

    Also note the "createType" parameter.



  • 6.  RE: Shrink VMDK File

    Posted Jun 09, 2019 05:20 AM

    The supported method of shrinking a VMware virtual machine disk (VMDK) is to use VMware vCenter Converter Standalone and create a virtual to virtual (V2V) conversion, a similar process to a Physical to Virtual (P2V) conversion.

    Check https://www.vladan.fr/reduce-vmdk-size/  and Shrink a VMDK using VMware Converter  .

    Regards,

    AJ