Hello Nitin Arora
We noticed your have rated low on one of the answer as not helpful. Thank you for taking time to share feedback.
D4s_v4 series supports nested virtualization, which allows you to run Hyper-V inside the VM.
If you are still encountering the "Hyper-V cannot be installed because virtualization support is not enabled in the BIOS" error, here are some steps you can follow to troubleshoot the issue:
- Stop the VM.
- Install powershell modules on your local machine and connect to Azure.
- Enable Nested virtualization as mentioned below:
# Replace with your VM and resource group names
$vmName = "YourVMName"
$resourceGroup = "YourResourceGroupName"
# Get the VM object
$vm = Get-AzVM -Name $vmName -ResourceGroupName $resourceGroup
# Enable nested virtualization
Set-AzVM -VM $vm -NestedVirtualizationFlag On
# Update the VM
Update-AzVM -VM $vm -ResourceGroupName $resourceGroup
- Start Azure VM.
- Try to install Hyper-V role.
Also, refer this document (https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-vm-by-use-nested-virtualization) which was mentioned in previous response by Boris.
Hope this helps.
If the answer is helpful, request you to take a resurvey.