Issue creating Gold Image on Azure VM

This situation i faced recently where i was doing migration from On-prem to Azure. Customer confirmed he has static App servers hence rather moving all the servers only move few servers , one for each app and latter we would create Image in Azure and deploy VM as many as required.

Now to accomplish this task we were using RM tool , its image based replication tool & we were able to replicate all the VM's from on-prem to Azure and things were under control.

Now we have Azure VM running and we need to create the Custom image or Gold image by -


  • Login to the VM
  • Run Sysprep -generalized & shutdown
  • Capture the Image 
  • Create VM from the Captured image

All VM were good except one where we got the issue while doing sysprep , i couldnt capture the image for this error but it was saying unable to validate installation and check log  - in logs it was saying pending reboot 

C:\windows\system32\sysprep\panther\


After checking log setupact.log - we could figure out system is pending reboot due to updates but the worst part os we could already rebooted system twice.

So we did try couple of steps but no go, finally we tried to check the updates scan as machines was last update 6 months ago -

SFC /Scannow

Result of above command gave the clear instruction that there is some error and system is trying to fix and its pending , then we tried to rebuild it  or fixed the corruption by -

DISM.exe /Online /Cleanup-image /Restorehealth

it took a while and after a reboot we ran the SFC /Scannow  which gave the proper result and we could fix the Sysprep error & able to create the Gold Image successfully.


No comments:

Post a Comment

MS Defenders

 Microsoft Defender offers a wide range of security solutions, similar to the ones we've discussed (Defender for Containers, Defender fo...