VMware vSphere

 View Only
Expand all | Collapse all

Recover deleted vmdk files?

  • 1.  Recover deleted vmdk files?

    Posted Aug 22, 2013 02:01 AM

    I accidentally deleted four vmdk files that I absolutely need to recover.  What are my options?



  • 2.  RE: Recover deleted vmdk files?

    Posted Aug 22, 2013 01:51 PM

    If it is just the vmdk files and not the flat-vmdk files you have deleted, the it is possible to recreate them using the step-by-step guide from KB1002511 ( http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511 ).

    If you deleted the flat file, then you will have to restore from backup.



  • 3.  RE: Recover deleted vmdk files?

    Posted Aug 22, 2013 07:35 PM

    are the vmdks thick provisioned ?
    if yes I may be able to help - if they are thin provisioned call Ontrack



  • 4.  RE: Recover deleted vmdk files?

    Posted Oct 24, 2013 12:01 PM

    Mine were. Can you help, please?



  • 5.  RE: Recover deleted vmdk files?

    Posted Oct 24, 2013 01:13 PM

    We have good success using VMFS Recovery from Disk Internals.

    Recover Data from VMFS, ESX, ESXi, vSphere Disks



  • 6.  RE: Recover deleted vmdk files?

    Posted Mar 14, 2014 10:09 AM

    Dear einstein

    It wasn’t working totally, are you sure
    it was working in vmware esxi 5.1 or new?

    @ did anyone try it ? , please share the infomation, thanks you.



  • 7.  RE: Recover deleted vmdk files?

    Posted Mar 14, 2014 12:01 PM

    I would try vmfs-fuse first - thats a free tool available for Linux.
    In my recovery work I occasionally check what Diskinternals or UFS-explorer would be able to recover - but I do not remember a single case where we actually used one of them.

    When the deleted vmdks were thick provisioned and the datastore was not too full I use a manual procedure to extract those vmdks.



  • 8.  RE: Recover deleted vmdk files?

    Posted Mar 18, 2014 05:07 AM

    Dear continuum-san,

    Thanks your feedback,

    I re-try the Diskinternals as you mentioned.

    Now it is working in W2K8R2, but the progress is so lazy only 4% for every
    5hours.:smileysad:

    it still is scanning disk, maybe my disk was too big to recovery.



  • 9.  RE: Recover deleted vmdk files?

    Posted Aug 20, 2014 07:01 PM

    hello

    i'm looking the best way to recover vmdk file from ESXi 3 datastore ,for your info i have vmfs recovery , ontrack easy recovery enterprise 11

    Best regard



  • 10.  RE: Recover deleted vmdk files?

    Posted Apr 12, 2014 06:49 AM

    I would like to share the best third party tool which let you recover your data from deleted, formatted or lost VMDK files/folders or partition. Using this VMDK recovery software [Moderator edit: Removed spam link] one can easily get its important VMware files (created under NTFS/FAT file systems).



  • 11.  RE: Recover deleted vmdk files?

    Posted Apr 18, 2014 08:37 AM

    Dear Anglina-san,

    Thank you for your kindness, but I already gave up to recovery date.



  • 12.  RE: Recover deleted vmdk files?

    Posted May 04, 2015 11:48 PM

    Firts be sure that you make a copy of files, what you want to delete, it is nclear, but sometimes it is be deleted in reccycle bin, and sometimes just go who knows where and cannot be recoverd !!!

    So make a copy of each file you want to delete and better use option move it in (recycle bin, or where you want, you have this option in most windows boost software as auslogics boot speed (not free, but you habe it in torrents) or just add that keys to enable this in right click menu cotext:see attachnents !!!



  • 13.  RE: Recover deleted vmdk files?

    Posted May 04, 2015 11:52 PM

    Firts be sure that you make a copy of files, what you want to delete, it is nclear, but sometimes it is be deleted in reccycle bin, and sometimes just go who knows where and cannot be recoverd !!!

    So make a copy of each file you want to delete and better use option move it in (recycle bin, or where you want, you have this option in most windows boost software as auslogics boot speed (not free, but you habe it in torrents) or just add that keys to enable this in right click menu cotext:see attachnents !!!

    and see

    11.  Re: Recover deleted vmdk files?

    or just for you agin add it to right click context meny only wit this;



  • 14.  RE: Recover deleted vmdk files?

    Posted Sep 30, 2016 09:15 AM

    The best option is using a snapshot you've saved earlier. Virtual machine provides you a feature for saving snapshot, so that you can recover data if any problem or issue takes place. If there's nothing like that, you must try VMDK Recovery software to recover files from VMDK. The blog post shared below contains a very useful information regarding this. You must read the blog post.

    [Moderator edit: Removed spam link.]

    I hope this would be helpful here.

    Regards.



  • 15.  RE: Recover deleted vmdk files?

    Posted Feb 13, 2017 08:30 AM

    Want to recover deleted VMDK files then go for the Best VMDK recovery software [Moderator edit: Removed spam link] with the help of which you can easily recover your deleted VMDK files in no time. The manual process is also available but everyone can not process it and can lose your data permanently. This software provides you the efficient features like three scanning modes, the most important feature of the software that helps to recover the deleted VMDK file easy and many more. The free version is also available.



  • 16.  RE: Recover deleted vmdk files?

    Posted Feb 20, 2017 06:13 AM

    > Want to recover deleted VMDK files then go for the Best VMDK recovery software [Moderator edit: Removed spam link] with the help of which you can easily recover your deleted VMDK files in no time.
    I wonder why you post this in the vSphere-forum ?
    The software you mentioned is completely useless for any scenario that is about recovering deleted vmdks from a vSphere-datastore.
    If you are interested in advertising your product you should know this yourself.
    If you are posting this as a normal user you should have noticed this in your first attempt of using this tool.
    If you post this because you just heard about somebody that has heard about a case ... sorry - that is not helpful for any user that reads this post.
    Ulli



  • 17.  RE: Recover deleted vmdk files?

    Posted Feb 20, 2017 07:06 AM

    In this forum, if any body post the question/query then we can reply with appropriate answer, Is it this tool (Best VMDK recovery software) recommended by vmware ?

    I am not advertising any product here , we are here share our knowledge , that's why I gave also KB along with my answer.

    edit wila: Removed spam link, do not repost a link previously removed by another moderator please!



  • 18.  RE: Recover deleted vmdk files?

    Posted Mar 05, 2018 10:30 AM

    If your .vmdk file deleted from your storage device. Then you have to recover it by using any trusted recovery software. I found most of the above replies are suggesting to use vmdk data recovery software. Its wrong, your file is deleted from storage device so you need an HDD recovery software. I also faced the same kind of situation and I used SysTools Hard Drive Data Recovery Software and recovered all type data. Also, the SysTools provides hard drive recovery and VMDK Data Recovery in the bundle.



  • 19.  RE: Recover deleted vmdk files?

    Posted Feb 20, 2017 05:25 AM

    If you have flat.vmdk file then you can recover vmdk file by creating descriptor file.

    Here is the process

    Detailed steps

    To create a virtual machine disk:

    1. Log in to the terminal of the ESXi/ESX host
    2. Navigate to the directory that contains the virtual machine disk with the missing descriptor file using the command:

      # cd /vmfs/volumes/myvmfsvolume/mydir

      Notes:
      • If you are using a version of ESXi, you can access and modify files and directories using the vSphere Client Datastore Browser or the vifs utility included with the vSphere CLI. For more information, see the section Performing File System Operations in the vSphere Command-Line Interface Documentation.
      • If you are using VMware Fusion, the default location for the virtual machine files is the home/Documents/Virtual Machines.localized/virtual_machine/ folder, where home is your home folder, and virtual_machine is the name of the virtual machine.

    3. Identify the type of SCSI controller the virtual disk is using by examining the virtual machine configuration file (.vmx ). The controller is identified by the line scsi#.virtualDev , where # is the controller number. There may be more than one controller and controller type attached to the virtual machine, such as lsisas1068 (which is the LSILogic SAS controller), lsilogic , or buslogic . This example uses lsilogic :

      scsi0.present = "true"
      scsi0.sharedBus = "none"
      scsi1.present = "true"
      scsi1.sharedBus = "virtual"
      scsi1.virtualDev = "lsilogic"



    4. Identify and record the exact size of the -flat file using a command similar to:

      # ls -l vmdisk0-flat.vmdk

      -rw------- 1 root root 4294967296 Oct 11 12:30 vmdisk0-flat.vmdk



    5. Use the vmkfstools command to create a new virtual disk:

      # vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk

      The command uses these flags:

      • -c size

        This is the size of the virtual disk.

      • -a virtual_controller

        Whether the virtual disk was configured to work with BusLogic, LSILogic (for both lsilogic and lsilogic SAS), Paravirtual, or IDE:
        Use lsilogic for virtual disk type "lsilogic" and "lsisas1068"

      • -d thin

        This creates the disk in thin-provisioned format.
      Note: To save disk space, we create the disk in thin-provisioned format using the type thin . The resulting flat file then consumes minimal amounts of space (1 MB) instead of immediately assuming the capacity specified with the -c switch. The only consequence, however, is the descriptor file contains an extra line that must be manually removed in a later step.

      The temp.vmdk and temp-flat.vmdk files are created as a result.


    6. Delete temp-flat.vmdk , as it is not needed. Run the command:

      # rm -i temp-flat.vmdk


    7. Rename temp.vmdk to the name that is required to match the orphaned .flat file (or vmdisk0.vmdk , in this example):

      # mv -i temp.vmdk vmdisk0.vmdk


    8. Edit the descriptor file using "vi" text editor ( vi vmdisk0.vmdk, in this example)

      1. Under the Extent Description section,

        • Use command "Shift + r" to enter replace mode.
        • Locate and change the name of the .flat file to match the orphaned .flat, Press "Esc" to exit replace mode.
      2. Find and remove the line ddb.thinProvisioned = "1" if the original .vmdk was not a thin disk. If it was, retain this line. Use command "Shift + zz" to save and exit "vi" editor.


        # Disk DescriptorFile
        version=1
        CID=fb183c20
        parentCID=ffffffff
        createType="vmfs"

        # Extent description
        RW 8388608 VMFS "vmdisk0-flat.vmdk"

        # The Disk Data Base
        #DDB

        ddb.virtualHWVersion = "4"
        ddb.geometry.cylinders = "522"
        ddb.geometry.heads = "255"
        ddb.geometry.sectors = "63"
        ddb.adapterType = "lsilogic"
        ddb.thinProvisioned = "1"


        The virtual machine is now ready to power on. Verify your changes and ensure Disk chain is consistent before starting the virtual machine.

    9. To check the disk chain for consistency, run this command against the disk descriptor file:

      For ESXi 6.0 and 5.x:

      # vmkfstools -e filename.vmdk

    https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511



  • 20.  RE: Recover deleted vmdk files?

    Posted Feb 20, 2017 05:54 AM

    Hi Rajev

    The procedure you posted looks like you just copied some lines from the knowledgebase.
    Unfortunately doing it like this is neither the fastest, nor the smartest nor the best way to do it.
    IMHO this KB should be deleted.
    I do not support doing it like this as it is based on guesswork and can make matters worse.
    Anyway - posting this in this context is not helpful.
    Regards
    Ulli