VMM 2012 change BITS port used for template provisioning (BITS over HTTPS)
For provisioning a template from the Library VMM uses BITS (Background Intelligent Transfer Service). BITS was designed to transfer large amounts of data without consuming a lot of network bandwidth by sending the data in small parts.
In many cases, you might receive an error in the VMM log when you provision a new VM from a template. VMM uses BITS over HTTPS (port 443), in many cases port 443 is used for other services on the VMM server (such as IIS). This can cause conflicts with BITS.
To solve this issue you will have change the BITS port number from 443 to something else (port 8500 for example) on the VMM server and on the Hyper-V servers that need to be able to receive the provisioned templates. If you have the Windows Firewall enabled on the VMM server or the Hyper-V servers then you also have to create a rule for BITS on port 8500 outgoing on the VMM server and BITS on port 8500 incoming on the Hyper-V servers.
The port setting is located under *HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings
*
Locate the BITSTcpPort Key and change it from 443 to 8500 (or any other port number).
Restart the VMM server service to apply the changes.
In this scenario where is VMM used to provision new Windows 7 VDI VM's or new Citrix XenApp RDS server VM's with the XenDesktop wizard or the Streaming wizard on Citrix Provisioning Server, this solved the issue on BITS failing after 10-70% with a BITS over HTTPS error.
It was also noticed that when starting multiple template provisioning jobs (2-10) it took the same time to complete all the jobs as with just 1 job with the same VM template.
Do not forget to also change this on all Hyper-V servers that need to receive templates and to add Firewall rules to allow the new port you configured.