Hi Minghui Song,
As mentioned in the document https://learn.microsoft.com/en-us/azure/virtual-machines/linux/n-series-driver-setup#ubuntu Installing third-party drivers requires extra-steps on VMs with TrustedLaunch and Secure Boot enabled. They require the user to add a new Machine Owner Key for the system to boot.
If Secure Boot must remain enabled, you must manually sign the kernel module.
This might give you more insights: https://forums.developer.nvidia.com/t/nvidia-drivers-not-working-while-secure-boot-is-enabled-after-updating-to-ubuntu-24-04/305351
Meanwhille, can you provide with the vm sku details?
Install GRID driver on Ubuntu with Secure Boot enabled
The GRID driver installation process does not offer any options to skip kernel module build and installation and select a different source of signed kernel modules, so secure boot has to be disabled in Linux VMs in order to use them with GRID, after installing signed kernel modules.
Let me know if you have any further queries!