12 Replies Latest reply on May 20, 2018 3:09 AM by a.p.

    How to recover vm after deleting the snapshots in vSphere Client?

    Dodiviper Novice

      I lost my host server and in an attempt to retrieve a vm that had 2 snapshots to another server, I deleted them instead of joining them, at the time I imported the vmx file from the datastore, using the vSphere Client.

       

      The files "*00000N.vmdk "still exist, but the vm is well outdated.

       

      How do I solve?

       

      This is the vmx file:

      .encoding = "UTF-8"

      config.version = "8"

      virtualHW.version = "7"

      pciBridge0.present = "TRUE"

      pciBridge4.present = "TRUE"

      pciBridge4.virtualDev = "pcieRootPort"

      pciBridge4.functions = "8"

      pciBridge5.present = "TRUE"

      pciBridge5.virtualDev = "pcieRootPort"

      pciBridge5.functions = "8"

      pciBridge6.present = "TRUE"

      pciBridge6.virtualDev = "pcieRootPort"

      pciBridge6.functions = "8"

      pciBridge7.present = "TRUE"

      pciBridge7.virtualDev = "pcieRootPort"

      pciBridge7.functions = "8"

      vmci0.present = "TRUE"

      nvram = "1.35 - Portal.nvram"

      virtualHW.productCompatibility = "hosted"

      powerType.powerOff = "soft"

      powerType.powerOn = "hard"

      powerType.suspend = "hard"

      powerType.reset = "soft"

      displayName = "Minerva 1.35"

      extendedConfigFile = "1.35 - Portal.vmxf"

      numvcpus = "4"

      scsi0.present = "TRUE"

      scsi0.sharedBus = "none"

      scsi0.virtualDev = "lsilogic"

      memsize = "25600"

      scsi0:0.present = "TRUE"

      scsi0:0.fileName = "1.35 - Portal.vmdk"

      scsi0:0.deviceType = "scsi-hardDisk"

      ide1:0.present = "TRUE"

      ide1:0.fileName = "/vmfs/volumes/4df79273-59fcf31a-6833-b8ac6fb39770/CentOS-6.4-x86_64-bin-DVD1.iso"

      ide1:0.deviceType = "cdrom-image"

      ethernet0.present = "TRUE"

      ethernet0.virtualDev = "e1000"

      ethernet0.networkName = "VM Network"

      ethernet0.addressType = "vpx"

      ethernet0.generatedAddress = "00:50:56:9a:00:0b"

      chipset.onlineStandby = "FALSE"

      guestOS = "centos-64"

      uuid.bios = "56 4d d2 4c 8f f6 04 22-0d d2 1e 6a 4b 97 97 15"

      vc.uuid = "50 1a d0 6d 42 3e 97 44-1b 44 f1 12 5e da 33 23"

      snapshot.action = "keep"

      sched.cpu.min = "0"

      sched.cpu.units = "mhz"

      sched.cpu.shares = "normal"

      sched.mem.minsize = "0"

      sched.mem.shares = "normal"

      vmci0.id = "-435293660"

      uuid.location = "56 4d d2 4c 8f f6 04 22-0d d2 1e 6a 4b 97 97 15"

      cleanShutdown = "TRUE"

      replay.supported = "FALSE"

      sched.swap.derivedName = "/vmfs/volumes/4df79273-59fcf31a-6833-b8ac6fb39770/1.35 - Portal/1.35 - Portal-b1be437b.vswp"

      debugStub.linuxOffsets = "0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"

      replay.filename = ""

      scsi0:0.redo = ""

      pciBridge0.pciSlotNumber = "17"

      pciBridge4.pciSlotNumber = "21"

      pciBridge5.pciSlotNumber = "22"

      pciBridge6.pciSlotNumber = "23"

      pciBridge7.pciSlotNumber = "24"

      scsi0.pciSlotNumber = "16"

      ethernet0.pciSlotNumber = "32"

      vmci0.pciSlotNumber = "33"

      vmotion.checkpointFBSize = "4194304"

      tools.remindInstall = "TRUE"

      hostCPUID.0 = "0000000b756e65476c65746e49656e69"

      hostCPUID.1 = "000206c220200800029ee3ffbfebfbff"

      hostCPUID.80000001 = "0000000000000000000000012c100800"

      guestCPUID.0 = "0000000b756e65476c65746e49656e69"

      guestCPUID.1 = "000206c200010800829822030febfbff"

      guestCPUID.80000001 = "00000000000000000000000128100800"

      userCPUID.0 = "0000000b756e65476c65746e49656e69"

      userCPUID.1 = "000206c220200800029822030febfbff"

      userCPUID.80000001 = "00000000000000000000000128100800"

      evcCompatibilityMode = "FALSE"

      tools.syncTime = "FALSE"

      migrate.hostlog = "./1.35 - Portal-b1be437b.hlog"

      ethernet2.virtualDev = "vmxnet3"

      ethernet2.pciSlotNumber = "160"

      ethernet2.startConnected = "FALSE"

      ethernet2.allowGuestConnectionControl = "TRUE"

      ethernet2.features = "1"

      ethernet2.wakeOnPcktRcv = "TRUE"

      ethernet2.addressType = "vpx"

      ethernet2.generatedAddress = "00:50:56:9a:00:07"

      ethernet2.networkName = "VM Network"

      ethernet2.dvs.switchId = ""

      ethernet2.present = "TRUE"

      ethernet0.startConnected = "FALSE"

      floppy0.present = "FALSE"

      ethernet1.present = "FALSE"

        • 1. Re: How to recover vm after deleting the snapshots in vSphere Client?
          a.p. Guru
          Community WarriorsUser ModeratorsvExpert

          Do you have a backup of all the files from before the VM was powered on?

          For how long was to VM powered on in the old state?

          Which files exactly do you have? Please provide a complete list, i.e. the output of ls -lisa from the command line.

          In addition to this, please compress/zip all the small descriptor .vmdk files, and attach the .zip archive to a reply post.


          André

           

          • 2. Re: How to recover vm after deleting the snapshots in vSphere Client?
            continuum Guru
            User ModeratorsvExpert

            To add to what Andre already said - it is important that you power off the VM as soon as possible in case you are still using it.
            If possible also reduce any other activity on the same datastore to the absolute minimum.

            • 3. Re: How to recover vm after deleting the snapshots in vSphere Client?
              Dodiviper Novice

              Hi, André

               

              I don't have backup of it.

              As the files were in a datastore islolated of this server and I have another Host, I added this vm to the inventory of the second host by the file "vmx", but didn't work because in the "scsi0:0.fileName" line there was the information of the snapshot file (scsi0:0.fileName = "1.35 - Portal-000002.vmdk") . This file there is yet, but I just managed to get up the vm by changing the vmx file on this line, pointing to the original vmdk.

              This vm stayed powered up little times, for now, it's off.

               

              Follow the list:

              /vmfs/volumes/4df79273-59fcf31a-6833-b8ac6fb39770/1.35 - Portal # ls -lis

              364910724 12370944 -rw-------    1 root     root        12667068416 Sep  6  2016 1.35 - Portal-000001-delta.vmdk

              381687940   64 -rw-------    1 root     root                330 Aug 30  2016 1.35 - Portal-000001.vmdk

              390076548 90113024 -rw-------    1 root     root        92274958336 May 10 21:14 1.35 - Portal-000002-delta.vmdk

              394270852   64 -rw-------    1 root     root                360 Sep  6  2016 1.35 - Portal-000002.vmdk

              310384772   64 -rw-r--r--    1 root     root                  1 Jan 22 16:25 1.35 - Portal-b1be437b.hlog

              637540484 135972864 -rw-------    1 root     root       139586437120 May 14 18:28 1.35 - Portal-flat.vmdk

              654317700   64 -rw-------    1 root     root               8684 May 14 13:35 1.35 - Portal.nvram

              641734788   64 -rw-------    1 root     root                525 Jul 12  2013 1.35 - Portal.vmdk

              633346180   64 -rw-r--r--    1 root     root                 78 Oct 18  2016 1.35 - Portal.vmsd

              624957572   64 -rwxr-xr-x    1 root     root               3348 May 14 18:32 1.35 - Portal.vmx

              629151876   64 -rw-r--r--    1 root     root                268 May 14 18:32 1.35 - Portal.vmxf

              771758212 1024 -rw-r--r--    1 root     root              72081 May 11 02:16 vmware-53.log

              775952516 1024 -rw-r--r--    1 root     root              71458 May 11 02:23 vmware-54.log

              780146820 1024 -rw-r--r--    1 root     root              72228 May 11 02:35 vmware-55.log

              784341124 1024 -rw-r--r--    1 root     root              71355 May 11 04:52 vmware-56.log

              260047044 1024 -rw-r--r--    1 root     root              75040 May 11 21:33 vmware-57.log

              8394884 1024 -rw-r--r--    1 root     root              73042 May 14 13:35 vmware-58.log

              12589188 1024 -rw-r--r--    1 root     root              72338 May 14 14:20 vmware.log

               

              All the vmdk files together have more 136 GB, I can't download easily.

              • 4. Re: How to recover vm after deleting the snapshots in vSphere Client?
                Dodiviper Novice

                Ok,

                yes, this vm is off.

                I have re-created the first Host and have already balanced the loads of vms.

                Thanks

                • 5. Re: How to recover vm after deleting the snapshots in vSphere Client?
                  a.p. Guru
                  Community WarriorsvExpertUser Moderators

                  Only the descriptor files are required. These are small text files. You'll have to use e.g. WinSCP to connect to the host to download these files, as they are kind of hidden in the Datastore Browser. Please compress the below mentioned files, and attach the .zip archive to a reply post.

                  381687940   64 -rw-------    1 root     root                330 Aug 30  2016 1.35 - Portal-000001.vmdk

                  394270852   64 -rw-------    1 root     root                360 Sep  6  2016 1.35 - Portal-000002.vmdk

                  641734788   64 -rw-------    1 root     root                525 Jul 12  2013 1.35 - Portal.vmdk

                  633346180   64 -rw-r--r--    1 root     root                 78 Oct 18  2016 1.35 - Portal.vmsd

                  624957572   64 -rwxr-xr-x    1 root     root               3348 May 14 18:32 1.35 - Portal.vmx

                  André

                  • 7. Re: How to recover vm after deleting the snapshots in vSphere Client?
                    a.p. Guru
                    Community WarriorsvExpertUser Moderators

                    The .vmdk files are missing!?

                    Btw. please use the Attach link in the lower right of the reply box.

                     

                    André

                    • 8. Re: How to recover vm after deleting the snapshots in vSphere Client?
                      Dodiviper Novice

                      This files (vmdk) are large and have sensitive information.

                      Btw. please use the Attach link in the lower right of the reply box.

                      • 9. Re: How to recover vm after deleting the snapshots in vSphere Client?
                        continuum Guru
                        User ModeratorsvExpert

                        The *.vmdk files that Andre asks for are small - just a few kb in size and contain NO sensitive data at all.
                        Due to a stupid design flaw in the Datastorebrowser you can not see them or download them with this tool.
                        Instead use WinSCP. Here VMDKs are displayed correctly - you will see one small vmdk-textfile and one large binary file named name-flat.vmdk or name-delta.vmdk.
                        Andre needs the small vmdk-textfiles

                        • 10. Re: How to recover vm after deleting the snapshots in vSphere Client?
                          Dodiviper Novice

                          Thank you!

                          But what I mean is that there are no files other than those I have already cited. Access via SSH with Xshell and I used WinSCP.

                          • 11. Re: How to recover vm after deleting the snapshots in vSphere Client?
                            Dodiviper Novice

                            This is the files on datastore, accessing with WinSCP:

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal.nvram

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal.vmsd

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal.vmx

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal.vmxf

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-000001.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-000001-delta.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-000002.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-000002-delta.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-b1be437b.hlog

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-b1be437b.vswp

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/1.35%20-%20Portal-flat.vmdk

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-55.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-56.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-57.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-58.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-59.log

                            /vmfs/volumes/Datastore%20-%20Storage/1.35%20-%20Portal/vmware-60.log

                            • 12. Re: How to recover vm after deleting the snapshots in vSphere Client?
                              a.p. Guru
                              vExpertCommunity WarriorsUser Moderators

                              In a previous reply I posted the five files that I need along with their sizes (left to the month column).

                              I understand that you don't want to disclose data, and that's absolutely ok. However, these 5 files do not contain user data, but are required to find out whether your issue can be solved.


                              André