cloud computing

Use a Non-SYSPREP VHD in Azure

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 <key>
  3. Set the correct KMS server, which should be, using
    slmgr /skms
    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 "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
  6. Make sure to not set a static IP address or disable RDP.
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.