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 <key>
- Set the correct KMS server, which should be kms.core.windows.net, using
then activate usingslmgr /skms kms.core.windows.net
- Configure the disk management policy to automatically bring online all new disks, using diskpart and running the command
- Configure the RDP keep-alive to avoid timeouts
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /t REG_DWORD /vKeepAliveEnable /d
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /t REG_DWORD /vKeepAliveInterval /d
- Make sure to not set a static IP address or disable RDP.