Mastering Windows Server 2016 Hyper-V

(Romina) #1

the following policy: Computer Configuration ➢ Administrative Templates ➢
Windows Components ➢ Cloud Content. Then turn off Microsoft Consumer
Experiences and set to Enabled. Microsoft has a full article on the Consumer
Experiences at https://blogs.technet.microsoft.com/mniehaus/2015/11/23/ seeing-
extra-apps-turn-them-off/. The command to be used in the OS is as follows:


C:\windows\system32\sysprep\Sysprep /generalize /oobe /shutdown /mode:vm


Windows 8 introduced the /mode:vm switch, which should be used when preparing a
Windows 8 VM that is being used as part of a VDI deployment. When Sysprep runs, it
performs several actions, including removing unique information such as the SID and
GUID; but it also resets the hardware information. In a VDI environment where all of
the duplicates are running on the same hypervisor as the source VM, there’s no need
to reset the hardware information. Not resetting the hardware is what the /mode:vm
switch enables. This speeds up the startup of the duplicates on first boot.


I recommend an extra step before running Sysprep. Over time, you will want to update
the template, including adding patches. There are ways to patch the virtual machine
without starting it, and I walked through some options in Chapter 5, “Managing
Hyper-V.” Still, it’s useful to be able to start the virtual machine, but remember that it
is not possible to run Sysprep continually on an operating system. Instead, I
recommend doing the following:


1 . Complete    the customization   of  your    reference   image   and shut    down    the virtual
machine.
2 . Create a checkpoint and label it Reference Pre-Sysprep.
3 . Start the virtual machine and run Sysprep, which will then shut down the virtual
machine so it will be ready for duplication.

If at any point in the future you need to boot the image to modify it, you apply the pre-
Sysprep checkpoint, make the changes needed, shut down the VM, delete the original
checkpoint, and create a new pre-Sysprep checkpoint. (You want to save this state
because it has the updates applied, but is pre-Sysprep allowing this to be used for
future changes) You then boot the virtual machine and run Sysprep again. The
important part is that the checkpoint is updated with the updates, but this is always
before the Sysprep action. Don’t worry about having the checkpoint; when a virtual
machine is used by the VDI collection creation, the virtual machine is exported to the
target collection, the latest state is used, and the checkpoints are ignored. What is
important is that the virtual machine should have no checkpoints that were taken
while the virtual machine was running; otherwise, the detection will show the virtual
machine as running, even though it isn’t.


You will now have a virtual machine template that will be referenced when creating a
VDI collection. Don’t forget to use Dynamic Memory for the virtual machine, because
this will give the most efficient use of memory and the greatest density of virtual
machines on the server. Make sure that the virtual machines have at least 1024MB of

Free download pdf