Here's a scenario that occurs quite frequently.
Before installing system updates I create a snapshot of a virtual machine in case something goes wrong. After the update is done and there are no problems, I want to remove the snapshot, as it would just be taking up space otherwise.
This means I need to turn the machine off (either completely, or save it). No issues there.
My gripe is that after saving the machine, I need to wait for the merge to complete (and depending on how many updates there were, this can take some time) and then manually bring the machine back up. I know Windows Server 2012 can perform merges when a machine is running, but we're using Windows Server 2008 R2.
Is there any way to have Hyper-V automate this process? I mean - bring the virtual machine up after merging, so I don't need to sit and wait around?
Of course there is. Using PowerShell you can stop the vm, start the merge, wait for it to compete, then start the vm.
Update: I thought that running a merge was asynchronous when run from PowerShell, but it appears to be synchronous. So a script would look like this: