I am constantly building new VM desktop images for my lab, here are some tips on how I am doing it.
I use MTD to make life easier. If unfamiliar, MDT (Microsoft Deployment Toolkit) is free, simple, and has a lot in common with SCCM task Sequence deployment, but will less overhead. I have a lot of standard stuff I put into builds, with just a small change here or there. MDT creates a bootable ISO that automates as much as you want. My ISOs only prompt for which task sequence to run and the OS name. Everything else is automated, including the domain join, timezone, and other out-of-box OS customizations. To get my resultant VMs to boot quickly, I do two important things before I take a snapshot.
First, is that I have a group of commands at the end of every task sequence. (Making it a group makes it easy to copy the entire group to a new task sequence). The group consists of 5 sets of two actions. The first action is an application “install” with the command “powershell.exe Sleep 240”. This command sleeps for 240 seconds and will be run after the automatic login completes. The second action is a reboot. The purpose of this is to train Microsoft ReadyBoot. It makes the OS boot much faster. About 180 seconds after logon completes, the system stops recording logon activity and updates the ready boot data. This data is used in the next boot to speed up boot time by pre-reading boot files during the boot process. I find about five times is great for speeding up the boot and more does not help. This training should be done after all installs have been completed. You can usually reduce a 45 second boot down to below 20 seconds with this.
Second, I remove the virtual CD used for booting before taking the snapshot. Under Hyper-V, this mount setting is saved with the snapshot and delays booting by about 10 seconds.
So what is in my standard App-V Client task sequence?
- Sysinternals BGInfo
- Sysinternals ProcessExplorer
- Sysinternals Process Monitor
- Disable Network Logon Password Change
- Enable Remote Desktop
- App-V 5 Prerequisites
- Restart Computer
- AppV 5 Client
- Disable Windows Updates
- Copy App-V Client Console Shortcut to desktop
- Set Powershell Execution Policy
- Copy PowerShell Shortcut to Desktop
- AppV_Manage 2.2
- Copy AppV_Manage shortcut to desktop
- Set of 5 sleep/restarts