14 Replies Latest reply on Sep 21, 2018 7:34 AM by a.p.

    Help with VMWare Delta file

    Kansarax Novice

      Hallo,

       

      I hope someone can help me.

      I did have a disk crash on a SAN and now I have I VM that starts with old data. I see there is a DELTA file on the disk.

      How can I merge the Delta file with the fat.vmdk file? If I right click on the VM, I see there is no snapshot.

      I tried to create a new snapshot and delete the snapshot. But this didn't work.

       

      Please help.

        • 1. Re: Help with VMWare Delta file
          Kansarax Novice

          any help would be appreciated

          • 2. Re: Help with VMWare Delta file
            TomHowarth Guru
            User ModeratorsvExpert

            I sugest you reach out to Ulli

             

            he will be best positioned to help you.  first things - first Stop doing what you are doing to that disk.

            • 3. Re: Help with VMWare Delta file
              a.p. Guru
              vExpertUser ModeratorsCommunity Warriors

              As a first step, please run

              ls -elisa > filelist.txt

              from the command line (in the VM's folder). Then download the filelist.txt, and attach it to a reply post.

               

              André

              • 4. Re: Help with VMWare Delta file
                Kansarax Novice

                Hi,

                 

                Thanks for the Reply.

                 

                I tried "ls -elisa > filelist.txt", get an error: ls: invalid option -- e

                 

                I have a flat file : VMSRV008_1-flat.vmdk

                and a delta file : VMSRV008-000002-delta.vmdk

                 

                I recreated the desriptor vmdk for the flat file (VMSRV008_1.vmdk)  and for the delta file(VMSRV008_1-000002.vmdk).

                If I add a disk the the VMSRV008, i see only the Descriptor of the Flat file((VMSRV008_1.vmdk) . Normally I should see the Descriptor file of the Delta (VMSRV008_1-000002.vmdk).

                If I add a disk with only VMSRV008_1.vmdk, I see old data from years ago. Can you please help?

                 

                This are the 2 Descriptor file:

                1) vi VMSRV008_1-000002.vmdk

                # Disk DescriptorFile

                version=1

                CID=e4df81c3

                parentCID=8a6b0dba

                createType="vmfsSparse"

                parentFileNameHint="VMSRV008_1.vmdk"

                # Extent description

                RW 41943040 VMFSSPARSE "VMSRV008-000002-delta.vmdk"

                 

                 

                # The Disk Data Base

                #DDB

                 

                 

                ddb.toolsVersion = "7304"

                 

                 

                2) vi VMSRV008_1.vmdk

                # Disk DescriptorFile

                version=1

                CID=8a6b0dba

                parentCID=ffffffff

                createType="vmfs"

                 

                 

                # Extent description

                RW 41943040 VMFS "VMSRV008_1-flat.vmdk"

                 

                 

                # The Disk Data Base

                #DDB

                 

                 

                ddb.virtualHWVersion = "4"

                ddb.uuid = "60 00 C2 92 dd 40 28 d2-d8 db 3b af f6 67 91 a6"

                ddb.geometry.cylinders = "2610"

                ddb.geometry.heads = "255"

                ddb.geometry.sectors = "63"

                ddb.adapterType = "lsilogic"

                ddb.toolsVersion = "7304"

                 

                Can you please help? What do I wrong?

                 

                Thank you!

                Kansarax

                • 5. Re: Help with VMWare Delta file
                  a.p. Guru
                  User ModeratorsvExpertCommunity Warriors

                  The descriptor files seem to be ok. The vSphere Client however dosen't allow to attach a snapshot to a VM.

                   

                  What you may do is:

                  1. add VMSRV008_1.vmdk to the VM's configuration (unless already done)
                  2. remove the VM from the vSphere Client's inventory (DON'T delete from disk!)
                  3. edit the VM's configuration (.vmx) file and replace "VMSRV008_1.vmdk" with "VMSRV008_1-000002.vmdk"
                  4. add the VM to the inventory
                  5. optional but recommended - create another snapshot

                   

                  Note: You can edit the .vmx file from either the command line, or by downloading it from the datastore. If you download it, you'll need to use an editor which can handle Linux line breaks!

                   

                  Since you've powered on the VM from the base virtual disk, you may see more, or less file system errors within the VM. You may also need to fix the parentCID in the snapshot file again, so that it matches the base disk's CID. If everything has been fixed, and the VM works as expected, you may then delete all snapshots (Button: "Delete All").

                  However, deleting all snapshots will merge the data from the delta file(s) into the flat file. If the flat file has been thin provisioned it may grow, so make sure there's sufficient free disk space on the datastore!

                   

                  André

                  • 6. Re: Help with VMWare Delta file
                    Kansarax Novice

                    Hallo André,

                     

                    Thanks for your reply.

                     

                    I did all the steps. Changed the VMX file, but when I start the VM, I receive this error:

                     

                    Sep 19 14:36:59.553: vmx| [msg.disk.noBackEnd] Cannot open the disk '/vmfs/volumes/4b44baa4-fda9ffd0-3624-0025b3e410d8/VMSRV008_2/VMSRV008_1-000002.vmdk' or one of the snapshot disks it depends on.

                    Sep 19 14:36:59.553: vmx| [msg.disk.configureDiskError] Reason: The parent virtual disk has been modified since the child was created.----------------------------------------

                    Sep 19 14:36:59.581: vmx| Module DiskEarly power on failed.

                     

                    What does this mean: "The parent virtual disk has been modified since the child was created." ?

                     

                    Thanks,

                    Kansarax

                    • 7. Re: Help with VMWare Delta file
                      a.p. Guru
                      User ModeratorsCommunity WarriorsvExpert

                      Virtual disks with snapshots work like chains. To ensure the integrity of this chain, each chain link contains a parentCID entry in the .vmdk descriptor file, which has to match its parent's CID.

                      Opening a virtual disk in read/write mode will change the CID. Since you've powered on the VM from the base disk, its CID doesn't match the snapshot's parentCID anymore, i.e. the snapshot chain is broken. That's why I mentioned that you may need to modify the parentCID entry in the snapshot's .vmdk file to fix the snapshot chain.

                      Keep in mind that this will only fix the snapshot chain, but any modified data in the base virtual disk that has been modified with running the VM from it may cause more, or less file system corruption.

                       

                      André

                      • 8. Re: Help with VMWare Delta file
                        Kansarax Novice

                        Hallo Andé,

                         

                        I checked the CID and changed the ParentCID, but still the same error.

                         

                        on the datastore, I see there is another DELTA file VMSRV002-000002-delta.vmdk, but I don't know if this belongs to the same disk or not. Is there a way to find this out?

                         

                        Thanks,

                        Kansarax

                        • 9. Re: Help with VMWare Delta file
                          a.p. Guru
                          vExpertUser ModeratorsCommunity Warriors

                          Not sure about "VMSRV002-000002-delta.vmdk".

                           

                          Anyway, another look at the descriptor files shows there's most likely a a typo in it.

                          parentFileNameHint="VMSRV008_1.vmdk"

                          # Extent description

                          RW 41943040 VMFSSPARSE "VMSRV008_1-000002-delta.vmdk"

                          "_1" is missing in the delta disk's file name.


                          André

                          • 10. Re: Help with VMWare Delta file
                            Kansarax Novice

                            Hallo André,

                             

                            I have not the VM running, but the second disk is in windows unallocated. When I use only the Flat file (without the delta file), It is allocated and can use it, but the data is very old.

                            I need the data.

                            Is there a way to get the data from the Delta into the flat file?

                             

                            Thanks,

                            Kansarax

                            • 11. Re: Help with VMWare Delta file
                              a.p. Guru
                              User ModeratorsvExpertCommunity Warriors

                              Please post a complete list of files in the VM's folder (i.e. the output of ls -lisa), and attach the VM's configuration (.vmx) as well as all the .vmdk descriptor files to a reply post.


                              André

                              • 12. Re: Help with VMWare Delta file
                                Kansarax Novice

                                Hallo André,

                                 

                                See attached filelist.

                                 

                                Thanks

                                • 13. Re: Help with VMWare Delta file
                                  Kansarax Novice

                                  Hallo André,

                                   

                                  I copied all the disk file :

                                  VMSRV008-flat.vmdk for disk 1

                                  VMSRV008_1-flat.vmdk and VMSRV008_1-000002-delta.vmdk for Disk 2

                                   

                                  I created the Descriptor files again. After that I created a VM with the existing disk.

                                   

                                  I can start the VM, but the second disk (With the Delta) is still unallocated.

                                   

                                  I hope you can help.

                                   

                                  Thanks a lot.

                                  Kansarax

                                  • 14. Re: Help with VMWare Delta file
                                    a.p. Guru
                                    vExpertCommunity WarriorsUser Moderators

                                    Please don't try to power on the VM too often. Each try might cause more corruption within the guest OS file system.

                                     

                                    Please attach the files I've asked for in my previous reply.

                                    "... and attach the VM's configuration (.vmx) as well as all the .vmdk descriptor files to a reply post."

                                     

                                    André