Use a Non-SYSPREP VHD in Azure

Learn the key steps to perform when uploading a non-SYSPREP'd VHD to Azure.

John Savill

May 29, 2014

1 Min Read
cloud computing

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:

  1. Move the pagefile to the temporary drive (typically D:).

  2. 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 
  3. Set the correct KMS server, which should be kms.core.windows.net, using

    slmgr /skms kms.core.windows.net

    then activate using

    slmgr /ato
  4. Configure the disk management policy to automatically bring online all new disks, using diskpart and running the command

    SAN POLICY=OnlineAll
  5. 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
  6. Make sure to not set a static IP address or disable RDP.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like