I'm trying to design an SCVMM (2012 SP1) service template that contains several machines joined in a domain, but the trick is that the very domain controller is also in the template. Ie. the template contains a machine that will become the AD and several machines which will join. Since the domain does no exists during deployment, the template declares all machines as part of a Workgroup. Application profile Pre-Install scripts do the work of running Install-ADDSForest
on the AD and Add-Computer
on the machines that join. With proper deployment order this works fine, but I have a problem as the next Pre-Install scripts start failing now:
Error (22725)
SCVMM received computer name<machine>.<domain>
for vm<...>
. Expected computer name is<machine>
.Recommended Action
Ensure that the vm has joined the right domain or workgroup and then retry the operation.
Oops. Since the rename occurred in the application scripts, SCVMM is not aware of it and is crying fault. But this is a chicken and egg problem...
Any suggestion of how to solve this problem?