"--enable-nested" option doesn't work expectedly #7200
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
Compute
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
extension/vm-repair
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
It is possible to create repair VM but Hyper-V is not enabled.
I see #7177 (the result is slightly different).
I believe "az vm repair run" will be executed via custom script, but I confirm there is no event.
azure-cli-extensions/src/vm-repair/azext_vm_repair/custom.py
Lines 219 to 244 in cf183a4
Related command
How to reproduce.
Errors
No error. From debug log, enabling Hyper-V could be skipped.
Running Script win-enable-nested-hyperv.ps1 to install HyperV
Your repair VM 'repair-nestedv_' has been created in the resource group 'repair-nestedvm-20240119062313' with disk 'nestedvm-DiskCopy-20240119062313' attached as data disk. Please use this VM to troubleshoot and repair. Once the repairs are complete use the command 'az vm repair restore -n nestedvm -g labnestedvm --verbose' to restore disk to the source VM. Note that the copied disk is created within the original resource group 'labnestedvm'.
Issue script & Debug output
Please see entire debug log at "Describe the bug"
Expected behavior
Enabled Hyper-V described in below document.
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/repair-windows-vm-using-azure-virtual-machine-repair-commands#repair-process-example
If you need to troubleshoot your VM in a nested Hyper-V environment, use --enable-nested and the repair VM will created with the Hyper-V role enabled along with a nested VM using the OS disk copy.
Environment Summary
$ az version
{
"azure-cli": "2.56.0",
"azure-cli-core": "2.56.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"vm-repair": "1.0.0b1"
}
}
Same in Azure Cloud Shell
Additional context
No response
The text was updated successfully, but these errors were encountered: