Link to home
Start Free TrialLog in
Avatar of Sundeep V
Sundeep V

asked on

File server not turning on after snapshot merge


We had multiple snapshots for one of our servers. So we just completed merge and all seemed ok. Once merge was completed. I deleted the checkpoint tree. 

Once deleted tried turning the Server on and it would not opening. Seems like its still pointing to the old AVHD. Is there something i need to do or missed?

Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

going into the vm settings what does it have for hard drive?  it is probably showing an avhdx.. change it to .vhd (.vhdx)
You will probably lose some data.. restore from backup
Avatar of Sundeep V
Sundeep V


Its pointing to old AVHDX file, the snapshot.
I tried changing but its greyed out as shown below

User generated imageI have checked and there is definitely no checkpoints. Either in settings or in the VM folders
try running
get-vm | remove-vmsnapshot
Do i just run that command? do i need to specify server name?
you could specify the vmname

get-vm vmname | remove-vmsnapshot

but without a name it will remove all snapshots from all vm's
Tried both method. Seemed to go through without errors but on VM settings still showing the old avhdx file and unable to open the VM
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Greyed out means that the vm is still online but it is hang.

Have you powered off / shutdown the vm?

Thanks currently copying the vhd files so have backup before i create new VM

And yes the VM is currently Off. There is no option to shutdown now, its showing off in console
Configured new virtual machine and noticed start menu desktop redirect and hone drive now not working.

Is this linked to me creating new vm? 

Redirected folders?  Machine not connected to domain?
All done - Noticed server IP was on DHCP so gave it the usual static IP and working again.

Will know mor once staff get in today but testing seems all ok

Thanks for your help David! much appreciated
While I suspect David is correct in what will get you running again, I'd be curious to know if you tried the powershell commands to merge the AVHDX file into the VHDX.  Never tried it myself, but something one method works when another doesn't.  At the very least you might get a more descriptive, googlable error message.

The instructions below are found in the latter part of this document:

  • To merge files with PowerShell (requires Windows 10/Server 2016 and later):
    1. Open PowerShell and run command to navigate to directory where AVHDX and VHDX files are located:
      • Note: if files are on different disk than C:, first change to correct disk with disk letter in PowerShell prompt:
        • <disk letter>:
        • For example, if data is located on drive D:, command would be:
          • D:
      • To change to correct directory:
        • cd <directory path where files are located>
    2. Run following command on each AVHDX file:
      • Get-VHD .\<name of AVHDX file>.avhdx
    3. Note name of parent AVHDX file from ParentPath entry in output
    4. Repeat steps 2 and 3 until you have a list of all AVHDX files with their respective parent AVHDX files
    5. Beginning from newest AVHDX file (only AVHDX file with no child file), run following command:
      • Merge-VHD -Path '<path to AVHDX>' -DestinationPath '<path to parent AVHDX'
    6. Repeat step 5 on each AVHDX, always starting with newest available file
    7. Once all AVHDX files are consolidated, merge last AVHDX with main VHDX file:
      • Merge-VHD -Path '<path to AVHDX>' -DestinationPath '<path to main VHDX disk'
    8. Note: this method requires that the Merge-VHD and Get-VHD cmdlets be added to your PowerShell; if you do not have it added, you may receive the following error:
      • Merge-VHD : The term 'Merge-VHD' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      • If you receive this error, run this command from an elevated PowerShell prompt to install the Merge-VHD cmdlet:
        • Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell