Use a Non-SYSPREP VHD in Azure
Learn the key steps to perform when uploading a non-SYSPREP'd VHD to Azure.
May 29, 2014
Q: I uploaded a VHD to Azure that isn't SYSPREP'd. Is there anything I need to do?
A: When you SYSPREP a virtual machine and upload to Azure, when Azure then deploys a virtual machine based on the template, the provisioning engine performs actions such as tweaking the RDP configuration, setting the KMS server, moving the pagefile to the temporary drive, and so on. If you just take a virtual machine and upload to Azure that isn't SYSPREP'd, then the Azure provisioning engine can't make these changes for you, which means you need to manually perform them. Remember that before you upload the virtual machine to Azure you must make sure RDP is enabled; the virtual machine will get a new NIC when uploaded to Azure and will therefore use DHCP automatically to enable you to connect to it. Then you need to perform the following actions:
Move the pagefile to the temporary drive (typically D:).
Configure the virtual machine to use KMS if it isn't already using it. You can find the KMS keys on the TechNet page "Appendix A: KMS Client Setup Keys." These keys vary based on the operating system version; they're set using
slmgr /ipk
Set the correct KMS server, which should be kms.core.windows.net, using
slmgr /skms kms.core.windows.net
then activate using
slmgr /ato
Configure the disk management policy to automatically bring online all new disks, using diskpart and running the command
SAN POLICY=OnlineAll
Configure the RDP keep-alive to avoid timeouts
reg add "HKLMSOFTWAREPoliciesMicrosoftWindows NTTerminal Services" /t REG_DWORD /vKeepAliveEnable /dreg add "HKLMSOFTWAREPoliciesMicrosoftWindows NTTerminal Services" /t REG_DWORD /vKeepAliveInterval /d
Make sure to not set a static IP address or disable RDP.
About the Author
You May Also Like