Hi Nilesh Maharjan,
Thanks for patience while we are reviewing your question.
Based on the query, I understand your concern why it happens at that time it might be issue when secure boot not enabled properly, I suggest that they check if Secure Boot is enabled correctly. This may be the cause of the problem. If Secure Boot is enabled properly, they can try restarting the VM in the Azure portal.
For more little bit details, during the installation of the NVIDIA GPU drivers, they will need to enroll the signing key because it belongs to a kernel module. When Secure Boot is enabled, they have to import the key, which is similar to the Machine Owner Key (MOK). After importing the MOK, they should reboot the VM
For more information, please refer to the documents and forum below. If you're already familiar with them, that's great
Ubuntu
Installing the NVIDIA Driver
How to install nvidia driver with secure boot enabled?
For the reboot loop with Secure Boot disabled Restarting the VM from the Azure portal can sometimes help resolve this. If the reboot loop continues, this could indicate a configuration issue.
Disclaimer: For third party links Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there
If you need any further assistance or additional information, please don't hesitate to let us know. We're here to support you and are always ready to help with anything to provide support whenever you need it.