Azure – Sysprep’d VHD uploaded to Azure stuck on language selection in boot diagnostics.

azuresysprepvirtual-machines

I am attempting to upload a VHD to Azure (resource manager) from our internal WDS in order to maintain continuity with an internal platform between Azure and out local VMs.

I've been able to successfully sysprep and upload the VHD. I'm also able to create a VM using Azure PowerShell. However, the final command to actually create the VM ends up failing after some time.

I've looked in to the issue and found that the VM gets created successfully in Azure, however, after looking at the boot diagnostics screen (screenshot of the VM boot process) I've found that the system gets stuck on the language selection/EULA acceptance section of the sysprep process.

So my question is: what is the best way to bypass the language/EULA screens and have the VM boot to windows?

I've been unable to find much related to this online, so it makes me think that there might be something simple that I'm missing. I've not been able to find a resource that includes anything that I've not been doing, however.

Thanks.

Best Answer

This ended up being a user error. I was attaching the VHD to the VM using the following command:

$vm = Set-AzureRmVMOSDisk -VM $vm -Name $osDiskName -VhdUri $osDiskUri -CreateOption Attach -Windows

I should have been using the following command:

vm = Set-AzureRmVMOSDisk -VM $vm -Name $osDiskName -VhdUri $osDiskUri -CreateOption fromImage -SourceImageUri $urlOfUploadedImageVhd -Windows

The key difference being that the first command simply attaches a VHD to the newly created VM, while the second uses the uploaded VHD as a template for the new VHD.

The incorrect command does not attach the unattend.xml file to the VM, only the second one does, so the system never got past the OOBE window in the boot process.

I got the correct information on how to attach the VM here.

Related Topic