Looklike Sysprep issue Timeout while creating the VM after out of customization Image for AVD

Nishikant raj 1 Reputation point
2023-10-12T18:02:06.65+00:00

I am creating one vm after the cutsimation and snapshot and vm cretion but facing issue while running the script vm creation take and doesn`t work



param([switch]$runSysprep=$false)
write-output "Sysprep Script Run, parameter 'runSysprep': $runSysprep"

if($runSysprep){
	write-output "starting Sysprep"
	Start-Process -FilePath C:\Windows\System32\Sysprep\Sysprep.exe -ArgumentList '/generalize /oobe /shutdown /quiet'
	write-output "started Sysprep"
}
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,586 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olga Os - MSFT 5,916 Reputation points Microsoft Employee
    2023-10-12T18:16:08.4933333+00:00

    Hello Nishikant raj,

    Welcome to the MS Q&A forum.

    Please make sure you deleted the panther directory (C:\Windows\Panther) before running the 'sysprep.exe /oobe /generalize /shutdown'.

    Another option to find the root cause is to attach the OS disk as data disk of the failed VM to any other working VM and review the c:\windows\panther\ logs.

    Source:

    Remove machine specific information by deprovisioning or generalizing a VM before creating an image


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards,

    Olga Os.