locked
Multiple AVHDX files for only one snapshot... RRS feed

  • Question

  • Hello together,

    we have multiple Hyper-V-Servers on a Windows Server 2012, and we are using the snapshots feature for all of them.

    But only one Hyper-V-Server is creating multiple AVHDX subfiles for only one snapshot. All other servers creating one new AVHDX file for every new snapshot. In the screenshot below you see a part of the files for only 2 snapshots of the "problem-server".

    The Hyper-V-Server with the problem is a Windows Server 2012R2 with MSSQL2014 Server.

    All our Hyper-V-Servers have nearly the same configuration in the Hyper-V-Manager.

    And if we create a new snapshot, at this particular time.this is the only snapshot. There are no overlapping creations of other snapshots.

    If you need more information, pls contact me.

    thx4all

    Bjoern

    Wednesday, March 16, 2016 12:08 PM

Answers

  • I think I'd found the solution. For more or less 2 weeks it is working.

    As long as I am waiting for each snapshot deletion to be finished, by checking if merging is done, and only afterwards automatically creating a new snapshot by the script, everything is working fine.


    • Marked as answer by bjoern.k Tuesday, April 26, 2016 9:56 AM
    • Edited by bjoern.k Tuesday, April 26, 2016 2:29 PM I was to tired / for better understanding
    Tuesday, April 26, 2016 9:56 AM

All replies

  • First, I hope you are not using checkpoints in production.  It is not a recommended practice.  This changes in 2016, but until then checkpoints in production can cause issues.

    As to the Virtual Machine (they are not Hyper-V Servers; that is another product from Microsoft, so using that terminology can be confusing) that is generating multiple AVHDX files ... Are you running some sort of backup program against that virtual machine?  Some backup programs create snapshots, and seeing that these files are all created at the same time, it is something that is happening at the same time every day. Find out what is happening at 7am every day and you will most likely find the culprit.


    . : | : . : | : . tim

    • Proposed as answer by Leo Han Monday, April 4, 2016 2:00 PM
    Wednesday, March 16, 2016 3:01 PM
  • First of all, sorry for the terminology! I get it, and I will try to Keep it in mind!

    OK, I admit i wrote a powershell script which deletes all snapshots, which are older than 3 days, and afterwards create a new one, and all before the development day starts in our office.

    But this is working for years with 10 virtual maschines without any problems. But if you can explain, why I should disable this, I am happy to read/learn!

    So, back to the Problem, and your suggestion. Yes, at 2 AM every day a Paragon backup Job is backing up the whole server on an mounted ISCSI volume. But this Job is configured with a max run time from 4 hours, and should also force to stop this job, if it rans longer as 4 hours (6AM). I looked it up, this job normally runs for about 30-45 minutes.

    I also looked up other automatic snapshots, other backup jobs from other virtual maschines, anything i thought it could interfere with the 7AM snapshot. But I cant find anything at all.

    PS: If I delete all actual snapshots from this virtual maschine, all subfiles are gone, and the Problem Comes back with making totally new ones.

    Thanks for you response...sry for today I am off...

    Greetings,

    Bjoern

    Wednesday, March 16, 2016 3:23 PM
  • If this is a lab environment, OK with the checkpoints.  It's in production that it is not recommended.

    I see 'SQL' in the names of many of those files. Is this the only VM with SQL installed?  Or is something running a backup from within that VM?


    . : | : . : | : . tim

    Wednesday, March 16, 2016 10:08 PM
  • Hi Bjoern,

    If you create a snapshot manually, how's the result?

    If possible, disable the backup program temporarily to see if the issue still happens.

    Are there any related events on the Hyper-V host?

    Best Regards,

    Leo


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, March 17, 2016 3:16 AM
  • Hi together,

    first of all, thx for your help!

    - manually it works as designed. I got only two files more. But the scripts is working for a really long time at different Hyper-V maschines without any problems. Maybe my problem is the reason why I shouldnt use the script ;)

    - I will disable the backup program before the next maintenance weekend (2016-04-09). Earlier is a Problem (vacation, easter...)

    - At 7 AM I really have nothing what could interfere with this. This is more or less the last job before my developers ;) are normally arriving!

    - This is the only MSSQL Hyper-V Maschine in my enviroment. More or less, there is also one Hyper-V with a TFS / SharePoint / MSSQL on the same maschine. But this maschine is totally independent.

    - Today I also changed the time to a totally different one...lets see...

    I'll report here, as soon as something has an effect / changed! If you have more ideas, you are very welcome!

    Greetings

    Bjoern

    Thursday, March 17, 2016 3:07 PM
  • Next weekend I'll have a maintenance, and test some more I cant test during the normal week workflows.

    I am curios, is there any real clue why a snapshot, created from a script, can produce multiple subfiles, and manually it doesn't happen? I looked at everywhere, there is no interfering job, task, backup. script...

    thx4all


    • Edited by bjoern.k Tuesday, April 5, 2016 8:08 AM
    Tuesday, April 5, 2016 8:08 AM
  • Is there a loop in the script?  You might want to start a transcript of the script to make sure it is executing in the manner you think it is executing

    . : | : . : | : . tim

    Tuesday, April 5, 2016 11:49 AM
  • hey tim,

    thx a lot.

    I saw something new. If the effect is happening, in the beginning there are multiple HRL files.

    Here is my script:

    $VM=Get-VM|Where{ $_.VMId –eq'fb63b152-f9aa-4ae1-8d6b-c470a7573714'}

    $Snapshots

     =Get-VMSnapshot$VM

    foreach($Snapshotin$Snapshots){

                                 

    if($snapshot.CreationTime -lt(Get-Date).AddDays(-3))

    Remove-VMSnapshot$Snapshot

    "*"

                                            }

                                        }

    "*maybe here I have to check if the merging is done, and afterwards taking the nex snap?"

    Checkpoint-VM

    $VM

    Thx for your help!

    Greetings

    Bjoern

    Friday, April 8, 2016 6:54 AM
  • Should be easy enough to test if it is a timing issue in your script.  It does take some time for the merge to happen after a snapshot is deleted.  I don't know if that would cause a subsequent request to create a new checkpoint.  But you could easily create a very simple script to work against a single VM with checkpoints to test it out.

    . : | : . : | : . tim

    Friday, April 8, 2016 12:23 PM
  • It also wasn't a time issue!

    I changed my script to waiting for the correcct Status (operating normally) of the hyper v maschine. The script took only the next snapshot, if the merging process (Status: Merge in procress) is over. This also doesnt help. After a few executions the extra files came back.

    Still fascinating is, if I delete manually the oldest snapshot, all the extra files will be deleted in the merging process. If my script is removing the oldest snapshot, it doesnt work that way. The "extra" files will stay, and also getting more an more after each next new automatic snapshot via script.

    Tuesday, April 12, 2016 2:40 PM
  • Sounds like it is time to open a support ticket with Microsoft so they can work through the issue with you.

    https://support.microsoft.com/en-us/contactus?forceorigin=esmc


    . : | : . : | : . tim

    Tuesday, April 12, 2016 3:00 PM
  • I think I'd found the solution. For more or less 2 weeks it is working.

    As long as I am waiting for each snapshot deletion to be finished, by checking if merging is done, and only afterwards automatically creating a new snapshot by the script, everything is working fine.


    • Marked as answer by bjoern.k Tuesday, April 26, 2016 9:56 AM
    • Edited by bjoern.k Tuesday, April 26, 2016 2:29 PM I was to tired / for better understanding
    Tuesday, April 26, 2016 9:56 AM
  • Makes sense.  It takes time for a merge to complete.  If you took a checkpoint while the merge was in process, it would be creating a new checkpoint file.

    . : | : . : | : . tim

    Tuesday, April 26, 2016 1:39 PM