none
Can not edit vhd, because the system thinks snapshots exist, but I disagree

    Question

  • Server 2008 (r1) SP2 host, running 2 Server 2008 virtual servers.

    The problem child is an Exchange 2010 server, with a fixed disk size of 500gb, currently at 95% of capacity.

    According to Hyper-V, no snapshots exist, None populate in the "snapshots" window, and when I navigate to the folder where Hyper-v wants to put them, none are present.

    When I shutdown the server, it makes no effort to merge any existing deleted, but not yet merged snapshots.

    I can't say with 100% accuracy that no snapshots have ever been taken of this virtual, but if they were it was a long time ago.

    I obviously need to expand this drive, and very soon if possible. How do I find the snapshot, that the edit vhd process thinks exists, or convince it that one doesn't?

    Richie

    Tuesday, October 8, 2013 1:33 PM

Answers

All replies

  • Hi Richie,

    did you check the settings of the Virtual Machine?
    In the VHD properties, go to Inspect. If there is a Snapshot, you should see it here.

    Best Regards,
    Jens


    jensit.wordpress.com

    Tuesday, October 8, 2013 3:11 PM
  • The inspect pop-up window doesn't mention a snapshot. (I don't see anywhere that it would either though).

    As far as I can tell, there are no snapshots. The edit button is greyed out, and included the error msg  "Edit is not available because snapshots exist for this virtual machine. Do not use another method to edit the virtual hard disk when snapshots exist, such as the Edit Virtual Hard Disk Wizard, because data loss will occur."

    Tuesday, October 8, 2013 6:05 PM
  • Ok, if here nothing is shown, I only have a very basic idea.

    Search for *.avhd in Windows Explorer ;-)


    jensit.wordpress.com

    Wednesday, October 9, 2013 7:20 AM
  • in 2008 r2 you could create and delete snapshots but they would not merge unless you shut down the machine, looking in hyperv manager you should see merge in process if it's merging. You could look in the VM's folder to see if there are avhd files there signifying a snapshot, also one the machine is off you can inspect the VHD to see if there are snapshots.
    Wednesday, October 9, 2013 12:14 PM
  • Hi,

    You can expand the running child vm after Server2008r2, the early version have some limiting conditions, such as you can’t expand the vhd when the child vm is running and at the save states.

    More information:

    Expanding Virtual Hard Disks with Hyper-V

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/03/12/expanding-virtual-hard-disks-with-hyper-v.aspx

    How to Increase the VHD Size in Hyper-V 2008 R2

    https://social.technet.microsoft.com/wiki/contents/articles/266.how-to-increase-the-vhd-size-in-hyper-v-2008-r2.aspx

    Hope this helps.


    Alex Lv

    Friday, October 11, 2013 4:57 AM
    Moderator
  • If the "Virtual hard disk" setting points at a .avhd  (rather than a .vhd)

    then you get the "edit is not available because checkpoints exist" message

    find the relevant .xml file

    stop vmms

    edit the xml file

    start vmms

    Friday, May 15, 2015 2:54 PM
  • What is the point of editing the XML file?

    Once a snapshot is deleted it is removed from the GUI.  And the VM must be powered off for the merge to happen.

    If there is a snapshot file (avhd / avhdx) and it is taken out of the path you create data loss.

    That is why I am trying to understand suggesting manually editing the XML configuration file.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Friday, May 15, 2015 3:50 PM
    Moderator
  • It's probably a bit late for you, but just in case anyone else comes here looking for a solution (Like I did).

    I just had the same issue - Unable to edit the VHD. Turns out the snapshot was selected rather than the original VHD image. I just went to browse and selected the original VHD Image. Hopefully this helps someone else.

    Wednesday, March 1, 2017 11:12 AM
  • stephc_msft

    This little nugget just saved my butt.  Stopped the HV service, edited the <g class="gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="5" id="5" style="font-size:0.75em;">xml</g> (after making a backup) and voila!

    Thank you!!!! 


    Saturday, May 13, 2017 11:25 PM
  • I think if you do this, you risk the chance of data loss.

    What I did was delete the snapshot.  When you delete the snapshot, the AVHD and VHD disk merge.  You'll see it in a small notification.  It is easy to miss.  But if you select the VM in Hyper-V console.  On the right navigation page near the bottom (right above help icon), it will say CANCEL MERGE IN PROGRESS.

    Once this notification is gone.  You can shut off the VM and edit the disk.



    • Edited by Kraziken Monday, October 2, 2017 7:45 PM
    Thursday, September 28, 2017 9:12 PM
  • I tried the above procedure proposed by NJ_BCS and broke my VM to where it would not boot. Please note: if you have a dynamically expanding VHD/VHDX drive and have one or more AVHD/AVHDX files attached, that those files are differencing disks and MUST be properly merged into the parent VHD/VHDX drive prior to "selecting" the parent (original) VHD/VHDX as the boot drive. Otherwise you WILL risk the chance of data loss and possibly (like me) end up restoring your VM from a backup.
    Sunday, August 5, 2018 5:27 PM