locked
Hyper-V - VHD and AVHD Files RRS feed

  • Question

  • Folks,

     

    I need a little bit of help.

    We virtualized a server around 4 months ago, it turns out a snapshot was created of the machine around the time that it was created.

    So since then it has been running off a differencing disk since then.

    When i navigate to the LUN location and view the files for this VM, i see a c, d, e, f and g file with extension .vhd.

    However there is also a smaller file with .avhd extension for each of these drives.

    So when i go into the Checkpoints for this VM i see Available checkpoints | Servername (Date Created) and then under that I have Now

    The LUN capacity is 2.3TB with 2.18Tb used. I have removed half a TB and moved to other storage, however this is not reflected on the LUN as vhd file still contains the files.

    What i want to know is how do I work the checkpoints so that i am not running off the differencing disk and that the vhd is merged with the avhd.

    Do i delete the Servername (Date Created) and then shut down.

    Any help would be greatly appreciated.

    Cheers

     

     

    Friday, April 8, 2011 10:18 AM

Answers

  • To merge your snapshots, you simply delete the snapshots in Hyper-V manager, or SCVMM. Power off your VMs, and let the merge process start. It can take up to 3 minutes before the process begins. 

    Some extra information about the snapshot feature in Hyper-V: http://kristiannese.blogspot.com/2010/11/snapshots-in-hyper-v-ground-rules.html

    Another option is also to take a new snapshot, and export the VM snapshot to a new LUN, and import the VM again. That would give you the exact same machine, without any snapshots. (only Hyper-V R2 can export snapshots)

     


    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )

    Friday, April 8, 2011 10:28 AM

All replies

  • To merge your snapshots, you simply delete the snapshots in Hyper-V manager, or SCVMM. Power off your VMs, and let the merge process start. It can take up to 3 minutes before the process begins. 

    Some extra information about the snapshot feature in Hyper-V: http://kristiannese.blogspot.com/2010/11/snapshots-in-hyper-v-ground-rules.html

    Another option is also to take a new snapshot, and export the VM snapshot to a new LUN, and import the VM again. That would give you the exact same machine, without any snapshots. (only Hyper-V R2 can export snapshots)

     


    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )

    Friday, April 8, 2011 10:28 AM
  • Hi Kristian,

     

    Thanks for the reply, so just to be sure, In checkpoints in scvmm, if i delete the root checkpoint ServerName (Date Created), then shut down the server, the vhd files and the avhd files should merge.

    I guess what is concerning me is that the Now Checkpoint - looks as if it is dependent on the root checkpoint.

    Cheers

    Friday, April 8, 2011 11:36 AM
  • "Thanks for the reply, so just to be sure, In checkpoints in scvmm, if i delete the root checkpoint ServerName (Date Created), then shut down the server, the vhd files and the avhd files should merge." 

    Yes, that is correct.

    "I guess what is concerning me is that the Now Checkpoint - looks as if it is dependent on the root checkpoint."

    Well, they are depending on eachother, in that way that each snapshot leads to another snapshot. However, you can delete a single snapshot, as well as the entire snapshot three. The merge-process will fix the rest. 


    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )
    Friday, April 8, 2011 11:41 AM
  • Hi Kristian,

    Thanks for the clarification, I have tested this in my test environment and it works as you have stated.

    My only remaining concern is "When the vhd and avhd files are being merged - is there any additional space requirement" - as we would be lacking in this department.

    Cheers

    Friday, April 8, 2011 3:17 PM
  • When it comes to free space, you should calculate enough space for a full copy of both parent vhd being merged, plus the additional child. (the background process actually do a full copy of both, merged, and then inserted back into the chain).

    Start with the smallest snapshot, delete it, and power off your VM. This should free up the space on your disk.

    Or, as I stated before: take another snapshot of your VM, export it to a LUN with 'enough' storage, and import it into Hyper-V again. 


    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )
    Friday, April 8, 2011 3:39 PM
  • Hi Kristian,

     

    We only have the one snapshot, which was taken the day it was P2V'd. The problem is that the Lun is 95% full - and we have little room to expand or to export to.

    I will have to steal from other luns in the interim and give back once the vhd and avhd's have merged.

    I presume that the avhds are merged one at a time and then deleted, so we may be all right in terms of space. Once they are merged we will get about half the lun back as data that was there at the time of the snapshot has been moved elsewhere, so when the merging completes - this should be reflected on the lun, as it is inside the VM. 

    Thanks for your advice on this.

    Friday, April 8, 2011 4:15 PM
  • Hi Kristian,

     

    I did this over the weekend and it has worked a treat. It took about 15 hours to complete, however one thing i have noticed is that the new vhd files are larger than the file sizess diplayed from withing the VM.

    3 of the drives are correct, however two of them arent. There is a discrepancy of about 800GB between the two.

    Any ideas.

    Cheers

    Monday, April 11, 2011 9:48 AM