This issue may occur if vCenter Server had lost its connectivity to the vCenter Server database and then got reconnected automatically.
To resolve this issue:
- Connect to the ESX host via the vSphere Client.
- Restart the VirtualCenter Server services.
- Deploy the templates and then power on the virtual machines.
If you see the error The option is not allowed in the current state of the host. " Error" CD Device still attach when trying to deploy a template from server 1 to server 2, convert the template back to a virtual machine to remove disk 2. Remove the host from vCenter Server, then add it back.