Thanks for sharing some work around but there is another problem:
1. I have installed an Azure Windows Server 2022 VM with preinstalled SQL Server and enabled sa account.
2. I sysprep the VM and generalized it
3. I captured the VM
4. I created a new VM using the captured image
Problem:
1. The drive letters are changed
2. The SQL Server doesn't run
3. usually the E drive letter is replaced with the CD drive which we need to replace with the temp drive.
4. If we change the drive letters then still the SQL doesnt work and we suppose to run some queries to fix the configuration.
5. we cannot run the query until the SQL Server is in running condition.
What is the proper way to capture the Windows Server 2022 with preinstalled SQL Server VM and redploy it with NO reconfiguration / troubleshooting required?