ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Hyper-V and deleting Snapshots

    IT Discussion
    hyperv snapshots virtualization storage
    6
    41
    8.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by

      Ok so that makes a bit more sense, now the last part.

      Why if you went to delete a VM and it's snapshots would the system merge them into one large file before dumping the entire item?

      StrongBadS coliverC dafyreD 3 Replies Last reply Reply Quote 0
      • StrongBadS
        StrongBad @DustinB3403
        last edited by

        @DustinB3403 said:

        Ok so that makes a bit more sense, now the last part.

        Why if you went to delete a VM and it's snapshots would the system merge them into one large file before dumping the entire item?

        Because otherwise you would lose your data and users would be pretty upset if that happened.

        1 Reply Last reply Reply Quote 0
        • coliverC
          coliver @DustinB3403
          last edited by coliver

          @DustinB3403 said:

          Ok so that makes a bit more sense, now the last part.

          Why if you went to delete a VM and it's snapshots would the system merge them into one large file before dumping the entire item?

          That one I don't know.

          My guess is that the original files and proceeding snapshots are locked for writing. So they have to merge the snapshots one at a time to release them. That is only a guess though.

          1 Reply Last reply Reply Quote 0
          • dafyreD
            dafyre @DustinB3403
            last edited by

            @DustinB3403 If you want to delete the entire VM (and its snapshots), it shouldn't try to merge. It would just delete all of the VHD's associated with that particular VM.

            1 Reply Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403
              last edited by

              StrongBad I get the part about being upset, but if your goal is to "free space" on your hyper-v server, presumably you know what you're wanting to do, which is the topic of the SW links in the original post.

              If the only way to free space on your server is to delete the VM's Snapshots, you're effectively deleting the delta changes to the VM.

              So you're telling the server to "go back to when I first installed the VM" in effect.

              dafyreD StrongBadS JaredBuschJ 4 Replies Last reply Reply Quote 0
              • dafyreD
                dafyre @DustinB3403
                last edited by

                @DustinB3403 If you delete the snapshots, then yes.... But if you merge them, then that is when it will free up the space.

                Typically what I do is merge in the oldest snapshots to free up space...

                1 Reply Last reply Reply Quote 1
                • StrongBadS
                  StrongBad @DustinB3403
                  last edited by

                  @DustinB3403 said:

                  StrongBad I get the part about being upset, but if your goal is to "free space" on your hyper-v server, presumably you know what you're wanting to do, which is the topic of the SW links in the original post.

                  Deleting snapshots is not an action for freeing space but for merging changes. If someone was doing snapshot deletion for the purpose of savings much space (other than the deltas) then presumably they don't know what they wanted to do.

                  DustinB3403D 1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403
                    last edited by

                    @dafyre which this will initially bloat the file size on the Hyper-V server, correct?

                    Until the merge is completed, what would happen if you attempted this merge, and didn't have enough free space on your Hyper-V server?

                    StrongBadS dafyreD 2 Replies Last reply Reply Quote 0
                    • StrongBadS
                      StrongBad @DustinB3403
                      last edited by

                      @DustinB3403 said:

                      If the only way to free space on your server is to delete the VM's Snapshots, you're effectively deleting the delta changes to the VM.

                      So you're telling the server to "go back to when I first installed the VM" in effect.

                      No, it might seem that way once you learn how each system works under the hood, but all VM platforms work the same - deletions DO remove the snapshot file but they don't kill the data, they merge it. VMware started this because it has a different kind of snapshot file and if HyperV did not keep the terminology you would have people killing their data right and left from confusion.

                      1 Reply Last reply Reply Quote 0
                      • DustinB3403D
                        DustinB3403 @StrongBad
                        last edited by

                        @StrongBad I can't speak for the SWOP, I'm just trying to understand Hyper-V as I avoid it here in our environment.

                        I prefer XenServer as the process is much more straight-forward.

                        1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @DustinB3403
                          last edited by

                          @DustinB3403 said:

                          StrongBad I get the part about being upset, but if your goal is to "free space" on your hyper-v server, presumably you know what you're wanting to do, which is the topic of the SW links in the original post.

                          If the only way to free space on your server is to delete the VM's Snapshots, you're effectively deleting the delta changes to the VM.

                          So you're telling the server to "go back to when I first installed the VM" in effect.

                          You are mixing up terms. you said delete the VM at one point. that to me means the entire VM gone. I have no idea if Hyper-V merges the checkpoints (proper term in hyper-v) or not before deleting. It would seem to be a waste of resources to do so.

                          If you just meant delete the checkpoints, then yes, of course it has to merge them. They are deltas. This is NO DIFFERENT in Xen or VMWare.

                          A snapshot is not a backup by itself. You make use of a snapshot to cause the system to cease writing to the .vhdx in order for it to then be copied to a backup medium.

                          You then merge the snapshot back in unless you need to have some on system return to this point for some reason.

                          You never keep snapshots for long periods because all you do it create an ever growing delta file.

                          1 Reply Last reply Reply Quote 1
                          • StrongBadS
                            StrongBad @DustinB3403
                            last edited by

                            @DustinB3403 said:

                            @dafyre which this will initially bloat the file size on the Hyper-V server, correct?

                            Until the merge is completed, what would happen if you attempted this merge, and didn't have enough free space on your Hyper-V server?

                            Should not cause any bloat.

                            1 Reply Last reply Reply Quote 0
                            • dafyreD
                              dafyre @DustinB3403
                              last edited by

                              @DustinB3403 I'm fortunate enough to have never been in that situation, so I really don't know.

                              And @StrongBad is right... My brain is not working right this morning...(still waiting on caffiene to kick in)...

                              1 Reply Last reply Reply Quote 0
                              • DustinB3403D
                                DustinB3403
                                last edited by

                                In xenserver, when I create a snapshot of my VM's they can be used as a complete restore. I export these off-host, and they are now "backups". They are intact backups that I can use at any time to recover a vm at any point in time.

                                I keep 4 backups (4 weeks worth of delta).

                                On Xen there isn't a merge of the files, at least from what I'm able to see. The VM size remains the same at the time of a Snapshot and export to a Backup.

                                I guess I'm just misunderstanding where the SWOP is having this file bloat that he's mentioning.

                                dafyreD JaredBuschJ scottalanmillerS 3 Replies Last reply Reply Quote 0
                                • dafyreD
                                  dafyre @DustinB3403
                                  last edited by

                                  @DustinB3403 Don't confuse what NAUBackup does with regular snapshotting. There is a difference.

                                  1 Reply Last reply Reply Quote 0
                                  • DustinB3403D
                                    DustinB3403
                                    last edited by

                                    I'm not trying to confuse the two, simply trying to explain what I see.

                                    And trying to understand the process of Hyper-V snapshot creation.

                                    So the baseline is Hyper-V will create an original snapshot (when the vm is brand new), and everything else afterwards is a delta change snapshot.

                                    Hyper-V then uses the 2 most current snapshots to run the VM? Is that correct?

                                    or Hyper-V uses the original snapshot, and the most current to run the VM?

                                    coliverC 1 Reply Last reply Reply Quote 0
                                    • coliverC
                                      coliver @DustinB3403
                                      last edited by

                                      @DustinB3403 said:

                                      I'm not trying to confuse the two, simply trying to explain what I see.

                                      And trying to understand the process of Hyper-V snapshot creation.

                                      So the baseline is Hyper-V will create an original snapshot (when the vm is brand new), and everything else afterwards is a delta change snapshot.

                                      Hyper-V then uses the 2 most current snapshots to run the VM? Is that correct?

                                      or Hyper-V uses the original snapshot, and the most current to run the VM?

                                      Hyper-V uses all of them, the same with VMWare and Xen. It only writes changes to the most recent one but it looks at all of them to read data.

                                      1 Reply Last reply Reply Quote 1
                                      • DustinB3403D
                                        DustinB3403
                                        last edited by

                                        @coliver So then it would be smart to regularly merge the Hyper-V snapshots to free up space on your server.

                                        And that seems really odd IMO. . .

                                        coliverC scottalanmillerS 2 Replies Last reply Reply Quote 0
                                        • dafyreD
                                          dafyre
                                          last edited by dafyre

                                          Not quite... Because you can take a Snapshot of a Snapshot... (Hyper-V calls these Checkpoints)...

                                          So if you have multiple snapshots anytime a READ occurs... It looks for it in the Current snapshot file... If it can't find it there, then it goes up to the previous snapshot file... and then it repeats that until it gets back to the original VHDX (I've heard some folks call this walking up the chain, lol).

                                          Any time a WRITE occurs, it happens to the current snapshot file.

                                          Edit: It is my understanding this is how pretty much all Hypervisors work with snapshots, please somebody correct me if I am wrong!

                                          1 Reply Last reply Reply Quote 0
                                          • coliverC
                                            coliver @DustinB3403
                                            last edited by coliver

                                            @DustinB3403 said:

                                            @coliver So then it would be smart to regularly merge the Hyper-V snapshots to free up space on your server.

                                            And that seems really odd IMO. . .

                                            Right... the same as VMWare and I am pretty sure Xen.

                                            Regardless of Hypervisor it is generally considered a good idea to merge your snapshots (or checkpoints) when you no longer need them. As has been said they shouldn't be used as backup there are much better tools for that.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post