This came up in a discussion with one of the virtualization MVPs the other day. How do you snapshot a complex demo environment that contains multiple virtual machines that are networking with each other?
The problem here is that the Hyper-V manager serializes operations like saving state and taking snapshots – which is to say that if you select a bunch of virtual machines and choose to snapshot them; we will snapshot the first one, then the second one, and so on. This means that you could end up with virtual machine snapshots that are minutes apart in time – which could cause problems.
There is a simple, but not obvious, way to get around this.
The first thing you do is select all the virtual machines you want to snapshot and “pause” them. This is a very quick operation and all virtual machines will be paused in a second or two. Unfortunately, you cannot snapshot a paused virtual machine. But you can put a paused virtual machine into a saved state – which is the second step (select the paused virtual machines and “save state” them).
Once the virtual machines are all in a saved state – you can now take a snapshot of the virtual machines.
When this is complete you can start the virtual machines running again – and now you have a set of virtual machine snapshots that were all taken in a very small window of time (from the perspective of the software running inside the virtual machines).
I figured this trick out when I was trying to do a demonstration of clustering inside virtual machines. I had a domain controller, iSCSI server and two cluster nodes. I wanted to use snapshots so I could repeatedly practice the demo – but I needed to snapshots to be at practically the same point in time – or the cluster would have all sorts of problems when I restored the snapshots. This process worked perfectly for me.