1

In Hyper-V, a VM needs to be shutdown for the merging of deleted snapshots to take place. The merge process can take a long time so I wanted to know if there is any available method/program/script to monitor the merge process and restart the VM once the merge is completed?

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
muhan
  • 145
  • 2
  • 6

1 Answers1

2

If you need to merge snapshots frequently, seriously consider upgrading to Server 2012, where Hyper-V is capable of live merging deleted snapshots (you would not need to shut down the VM using the VHD/AVHD any more).

With Server 2008(R2), you surely could Powershell to your liking using a variation of

gwmi -Namespace root\virtualization -query "select * from Msvm_ConcreteJob" | Where {$_.ElementName -eq 'Merge in Progress'}

to check on the merge process you are interested in and start the VM subsequently using Start-VM.

the-wabbit
  • 40,319
  • 13
  • 105
  • 169