A virtual desktop pool is a group of identically configured virtual machines on a Remote Desktop Virtualization Host (RD Virtualization Host) server. All virtual machines in a virtual desktop pool are identically configured; a user should see the same virtual desktop regardless of which virtual machine in the virtual desktop pool the user connects to.
Therefore, when you’re setting up a VDI system, you often want the virtual machines in a pool to be “stateless images,” so that when the user logs off, the virtual machine is reset to a known state. There’s an easy way to do this with Windows Server 2008 R2.
First, prepare your virtual machine in the initial state you want. Log off once you have finished your preparations.
Second, create a Hyper-V snapshot of the virtual machine.
Finally, rename the snapshot so that it contains “RDV_Rollback” (without the quotes) anywhere in the name.
That’s it. Now, as soon as the user logs off, the virtual machine will automatically roll back to this snapshot, reverting all changes made by the user.
Some things to keep in mind:
If there is a problem when Remote Desktop tries to apply the snapshot, a message will be logged to the Debug log of the TerminalServices-TSV-VmHostAgent eventlog: “Failed to request Hyper-V to apply a snapshot. Verify Hyper-V status. VM=<vmName>, Hr=<errorCode>”.
If you see this error, make sure that you haven’t modified Hyper-V’s Role-based Access Control to remove the permissions for “TS VM Host Agent.”