I need to be able to inject an unattend.xml into a powered off vm's vhd, then boot up the vm so that it gets renamed and domain joined via the unattend.xml file.
I have created an xml file using ADK and WSIM (which i have never done before, so that could be flawed). I do a sysprep /oobe /generalize /shutdown /mode:vm, power off the VM, mount the VHD file in the Hyper-V HOST OS. browse the file system to c:\windows\system32\sysprep and drop in an unattend.xml. When i boot the VM it doesn't seem like the unattend worked as it asks for product key and doesn't rename the server or join it to the domain.
The end game here is to have a powershell script that will copy the vhd to a remote office hyper-v server via usb drive in that office, create a new vm, have a form that asks for machine name and domain which then gets populated into the unattend.xml file on the usb drive. then mounts the VHD on the host OS, copies teh updated unattend.xml to the vm, dismounts the vhd, then powers on the vm. at this point the remote office should have a server 2012 server that is named and domain joined.
any thoughts?