June 17, 2015

SCVMM 2012 R2 - Offline VM templates mamagement

Keeping your VM templates up to date is very important in your virtual environment. Latest Windows Updates should be installed on VM template before this template is used for deployment to avoid unnecessary activity (downloading and installing the same updates over and over). For small deployments it is reasonable to update VM template manually by running VM, installing updates, sysprep system and then replace original image with new one. The question is how to deal with multiple templates or how to automate this process?

There are two ways to get it resolved:
1. Mount VM template and install Windows Updates by DISM tool or Add-WindowsPackage cmdlet. It will be done in offline mode, can be automated but *.cab or *.msu files must be downloaded before in specified local folder.
2. Second way requires deploying VM from Template (actually can be automated) and installing Windows Updates by using PSWindowsUpdate module. This way is the most complicated but it doesn't require maintaining windows updates files locally. It checks, downloads and installs updates directly from Windows Updates.

Links for this topic: Script: Image Factory for Hyper-V
Windows Update PowerShell Module
Step-by-Step: Offline VM Template Servicing with Windows Server 2012 R2 Hyper-V and PowerShell
Microsoft Updates Downloader PowerShell Module

No comments:

Post a Comment