none
Can you store an deleted VM in hyperv if you have a snap? RRS feed

  • Question

  • We have a hyper-v server and am wondering if the VM is deleted accidentally if a snap made before the deletion will it restore the VM ?



    dsk


    • Edited by kimdav111 Sunday, February 10, 2019 11:16 PM
    Sunday, February 10, 2019 11:15 PM

All replies

  • What was deleted? If just the config (deleted from Hyper-V Manager), then the VHD(x) is still there. You can create a new VM with the same configuration, then when you get to step Connect Virtual Hard Disk choose Use an existing and point to the existing VHD(x).

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    Sunday, February 10, 2019 11:34 PM
  • Hello!

    When you delete a virtual machine (VM) from the Hyper-V Manager it will simply remove the pointer to the VM, it won't delete the actual .vhd/.vhdx files, it's sort of a safety in case of an accidental deletion, the snapshot will be deleted though

    But you can create a new VM and attach the .vhd/.vhdx files and you will have your VM up and running once again.

    If you are deleting the VM completely by going to the directory where the Hyper-V virtual machine is located and delete the files from there, then you will not be able to restore it, unless you're using a backup software.

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Sunday, February 10, 2019 11:38 PM
  • Hi,

    Just check the situation about your issue.

    Best Regards,
    Frank

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 18, 2019 2:46 AM
    Moderator
  • We have a hyper-v server and am wondering if the VM is deleted accidentally if a snap made before the deletion will it restore the VM ?


    I think the question was related to how snapshots (actually 'checkpoints' nowadays) work.

    So if you

    • create a VM
    • take a checkpoint
    • delete the VM

    you have no VM anymore where you could select 'apply checkpoint'.

    As Dave pointed out, deleting a VM does not delete the virtual disk files, so of course you could still create a new VM and attach the existing disks. (It would create new NIC GUIDs though, so the NIC configuration inside the VM would be lost.) And if there was a checkpoint, you probably could use only the VHDX file (= the state where the first checkpoint was taken). All changes after taking the checkpoint would be in the AVHDX file, and I don't know if it is possible at all to attach this to a new VM (at least it's not so easy).

    Monday, February 18, 2019 6:33 AM
  • Hi,

    Was your issue resolved? 

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.


    Best Regards,
    Frank

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, February 20, 2019 8:39 AM
    Moderator