1 2 Previous Next 15 Replies Latest reply on Jun 24, 2020 5:25 PM by continuum

    VM with consolidated disk

    sandroalvesbrasil Enthusiast

      Hi,

       

      I have a VM that had a 100GB disk with 90% occupied.

       

      We created another 150GB disk and migrated the data to this new one.

       

      As this VM had a snapshot, the time to remove the snapshot took a long time even with the VM turned off and was canceled.

       

      Now the disk is about to be consolidated and when we try it has an error.

       

      I need to fix this problem and think of some alternatives:

       

      1 - A backup of the agent using Veeam for example and restore the disk in VMDK format and attach to the VM after removing the bad disk.

       

      But I wondered if it would be applicable to use vSphere Replication to have the shortest possible downtime. But I believe that it will present some type of error because the disks need to be requesting consolidation. Will it really show an error or will it be able to replicate using the disk with the current information (-flat of the snapshot)?

       

      Or would moving the VM from one dastastore to another also work?

       

      Thank you.

        • 1. Re: VM with consolidated disk
          a.p. Guru
          User ModeratorsvExpertCommunity Warriors

          Now the disk is about to be consolidated and when we try it has an error.

          Please provide details about the error you see, and how the VM's files currently look like, i.e. post the output of ls -lisa from the VM's folder.


          André

          • 2. Re: VM with consolidated disk
            ashilkrishnan Enthusiast
            VMware Employees

            Hi

             

            If the VM snapshots are not large and a downtime is possible for this VM, I would suggest cloning the disk to consolidate them

             

            1. Go to edit settings and make a note of the hard disk pointer.

            VM disk pointing to a snapshot will look like: VMname-00001.vmddk

            Regular VMDK without snapshots: VMname.vmdk

             

            2. Shutdown VM and take an SSH to ESXi host

            3. Clone the VM snapshot disk using vmkfstools utility. Please refer following as an example:

             

            vmkfstools -i "/vmfs/volumes/Datastore/examplevm/examplevm-000001.vmdk" "/vmfs/volumes/Datastore 2/newexamplevm/newexamplevm.vmdk"

             

            Add '-d thin' at the end to create a thin provisioned disk.

             

            KB reference --> VMware Knowledge Base

             

            Cloning process will consolidate the snapshots chain and create a new disk. Existing snapshot VMDK can be detached from the VM and you can attach this cloned VMDK

             

            Hope that helps

            • 3. Re: VM with consolidated disk
              sandroalvesbrasil Enthusiast

              Hi ashilkrishnan,

               

              grateful for the guidance.

               

              This VM is very critical and cannot be out of production for a long time.

               

              Imagine this:

               

              - A VM with only one 150GB disk, where 100GB is application data. To avoid expanding the VM disk and separating the OS from the application we created a new 200GB disk and moved the 100GB to this new 200GB disk. In other words, the snapshot disk that was not removed successfully is great for our environment, which has a very stressed storage.

               

              My fear of taking any action on that VM as a snapshot, removing snaphost or even consolidating can freeze the VM, so all actions when I run it I prefer to do with it off.

               

              But as the snaphsot is very large, the system will be off the air for a long time.

               

              So I thought about using the vMotion Storage feature or even a vSphere Replication to keep the VM on for as long as possible.

               

              Thank you.

               

              Capturar.JPG

              • 4. Re: VM with consolidated disk
                IRIX201110141 Master

                Click that dammed "delete all" button within Snapshotmanager and move on.

                • 5. Re: VM with consolidated disk
                  sandroalvesbrasil Enthusiast

                  Hi ashilkrishnan,

                   

                  I no longer have a snapshot, so it is pending to consolidate.

                   

                  My fear is when asking to consolidate the VM to freeze during the process.

                   

                  But from experience it will show error.

                   

                  Thank you.

                   

                  snap.JPG

                  snap1.JPG

                  • 6. Re: VM with consolidated disk
                    ashilkrishnan Enthusiast
                    VMware Employees

                    Hi

                     

                    Please go to edit settings and share a screenshot displaying the hard disks and it's VMDKs.

                     

                    To consolidate the snapshot, yes we have to run the delete all/consolidate option. Screenshot does not list any snapshots, so consolidation will not work until we create a new snapshot and initiate consolidation.

                     

                    Do you recall what error was reported when you tried consolidation last time ? We have following options:

                     

                    1. Create a test snapshot and initiate consolidation. Review the errors, if any

                    2. Shutdown VM and clone the VMDK using vmkfstools

                    3. As far as vSphere replication is concerned, it can also be used to create a copy of the disk. You would still require a downtime to detach existing VMDK and attach the replicated disk

                    • 7. Re: VM with consolidated disk
                      sandroalvesbrasil Enthusiast

                      Hi, ashilkrishnan

                       

                      using vSphere Replication I would have a much smaller RPO than cloning, because I would replicate the difference, turn off the production one and connect to another host. In this case, here is a cluster with two hosts.

                       

                      It's been a long time, I don't remember the mistake.

                       

                      I believe that the snapshot will not work, because the backup routine started to fail shortly after the consolidation state.

                       

                      Thank you.

                       

                      snap2.JPG

                      snap3.JPG

                      • 8. Re: VM with consolidated disk
                        ashilkrishnan Enthusiast
                        VMware Employees

                        Hard disk 1 is running on the base disk and hard disk 2 is the one which is running on snapshot disk

                        Hard disk 2 requires consolidation

                         

                        Yes, you can try replicating using vSphere replication from datastore to another

                        • 9. Re: VM with consolidated disk
                          scott28tt Guru
                          Community WarriorsUser ModeratorsVMware Employees

                          As you're using the old Windows client for vSphere, you may also be running what is now an unsupported vSphere version - you should consider an upgrade to at least 6.5 (if you're not already at that version) - particularly as this is clearly a production environment.

                          • 10. Re: VM with consolidated disk
                            a.p. Guru
                            Community WarriorsUser ModeratorsvExpert

                            You didn't answer my question, regarding the error message yet.

                            Anyway, according to your screenshots you seem to have ~200GB free disk space on the datastore, and the snapshot size is ~130GB. With the thin provisioned base disk being ~98GB, snapshot deletion may require up to ~100GB of temporary disk space on the datastore.

                            So what I would do is to follow  IRIX201110141's recommendation to create another snapshot and then run "Delete All" from the Snapshot Manager. Due to the snapshot size, this may take some time, so please remain patient, and ensure that no image based backup etc. kicks in during that time.

                            Regarding replication. IIRC, a VM must not have any snapshots when a new replication is started.


                            André

                            • 11. Re: VM with consolidated disk
                              sandroalvesbrasil Enthusiast

                              Hi a.p.,

                               

                              sorry for not responding the error is because this VM is very critical and after we cancel the removal of the snapshot we do not run a new snapshot to see the error.

                               

                              Even more that we moved it as a host so all history was lost.

                               

                              My fear is to run a new snapshot and the VM will freeze.

                               

                              • 12. Re: VM with consolidated disk
                                IRIX201110141 Master

                                Press the consolidate button now. There is no other solution.

                                 

                                Regards,
                                Joerg

                                • 13. Re: VM with consolidated disk
                                  Sukanyad Enthusiast
                                  VMware Employees

                                  Most of the Time the snapshot manager would not show snapshots and the only way we can resolve the snapshots is take a test snapshot and do a consolidate .There might be latency issue while the vm is powered on .But incase you have downtime you can go ahead and do delete all ,that might be faster .But again you need to wait until the consolidation is completed .

                                  • 14. Re: VM with consolidated disk
                                    sandroalvesbrasil Enthusiast

                                    Hi a.p.SukanyadIRIX201110141,

                                     

                                    this is an example of a 300G VM with a lot of transaction (Exchange).

                                     

                                    I ran a snapshot out of memory that is much faster, see ping.

                                     

                                    Imagine a VM with ~ 100GB of snapshot to consolidate.

                                     

                                    God help me!!!

                                     

                                    Thank you.

                                     

                                    snapx.JPG

                                    1 2 Previous Next