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.