Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Does repair vm requires public ip" No opion does not work #8453

Open
nohato opened this issue Feb 5, 2025 · 2 comments
Open

"Does repair vm requires public ip" No opion does not work #8453

nohato opened this issue Feb 5, 2025 · 2 comments
Assignees
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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@nohato
Copy link

nohato commented Feb 5, 2025

Describe the bug

I did 「az vm repair create -g rgname -n vmname --repair-username username --repair-password passwordinfo --enable-nested --verbose」with prompt 「"Does repair vm requires public ip" No」.
However public ip has been assigned on repair vm even though I set「"Does repair vm requires public ip" No」

We can repro easily.

Upon checking the az vm repair debug logs internal "az vm create" command set --public-ip-address repair-vm-wins_PublicIP.
I think should be set --public-ip-address "" in the case user set「"Does repair vm requires public ip" No」.

Related command

ea4af4c

az vm repair create -g rgname -n vmname --repair-username username --repair-password passwordinfo --enable-nested --verbose

Errors

No error. "Does repair vm requires public ip" No opion does not work

Issue script & Debug output

Debug log

===
cli.azext_vm_repair.repair_utils: Creating repair VM with command: az vm create -g repair-vm-winsvr-2019-01-20250205004741 -n repair-vm-wins_ --tag repair_source=*** --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk:20348.3091.250112 --admin-username *** --admin-password *** --public-ip-address repair-vm-wins_PublicIP --size Standard_D2s_v3
cli.azext_vm_repair.repair_utils: copy_disk_id: ***
cli.azext_vm_repair.repair_utils: fix_uuid: False
cli.azext_vm_repair.repair_utils: Validating VM template before continuing...
cli.azext_vm_repair.repair_utils: Calling: az vm create -g repair-vm-winsvr-2019-01-20250205004741 -n repair-vm-wins_ --tag repair_source=*** --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk:20348.3091.250112 --admin-username ******** --admin-password ******** --public-ip-address repair-vm-wins_PublicIP --size Standard_D2s_v3 --attach-data-disks *** --validate
cli.azext_vm_repair.repair_utils: Success.

cli.azext_vm_repair.repair_utils: Creating repair VM...
cli.azext_vm_repair.repair_utils: Calling: az vm create -g repair-vm-winsvr-2019-01-20250205004741 -n repair-vm-wins_ --tag repair_source=*** --image MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk:20348.3091.250112 --admin-username ******** --admin-password ******** --public-ip-address repair-vm-wins_PublicIP --size Standard_D2s_v3 --attach-data-disks ***
cli.azext_vm_repair.repair_utils: Success.

Expected behavior

Public IP should not be set on repair vm when the user set prompt "Does repair vm requires public ip" :NO

Environment Summary

Most recent version in Azure cloudshell

PS /home/nobumasa> az version
{
"azure-cli": "2.68.0",
"azure-cli-core": "2.68.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ai-examples": "0.2.5",
"ml": "2.33.1",
"ssh": "2.0.6"
}
}

Additional context

Related source code are here.
https://github.com/Azure/azure-cli-extensions/blob/main/src/vm-repair/azext_vm_repair/repair_utils.py#L802
https://github.com/Azure/azure-cli-extensions/blob/main/src/vm-repair/azext_vm_repair/_validators.py#L227
https://github.com/Azure/azure-cli-extensions/blob/main/src/vm-repair/azext_vm_repair/custom.py#L154

@nohato nohato added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 5, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 5, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Compute labels Feb 5, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team labels Feb 5, 2025
@yonzhan yonzhan added this to the Backlog milestone Feb 5, 2025
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 5, 2025
@yanzhudd
Copy link
Contributor

yanzhudd commented Feb 5, 2025

This module is actually owned by service team.
Hi @Sandido could you please take a look at this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants