New-AzVM installs BGInfo extension automatically #25517
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Compute - VM
Service Attention
This issue is responsible by Azure service team.
Description
When creating a new VM with 'New-AzVM' it will also install the BGInfo extension automatically
This will only happen if the '-VM' parameter is used to pass a virtual machine object. Even though BGInfo was not specified in the virtual machine object
New-AzVM -ResourceGroupName $rgname -Location $loc -VM $vmconfig
However, if you don't use the '-VM' parameter, then instead New-AzVM chooses default parameters and BGInfo is NOT installed
New-AzVM -ResourceGroupName $rgname -Location $loc' -Name VMname
You can see it here in New-AzVM source -
https://github.com/Azure/azure-powershell/blob/452b2d747938bf63361214f840baa35a114f2c95/src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs#L1195
The workaround is to use -DisableBginfoExtension, but that shouldn't be necessary since -VM isn't supposed to install BGInfo
Can we please change this so BGInfo does not automatically install?
Issue script & Debug output
Debug info was too long so it won't let me submit as it surpasses the character limit. If you need the debug logs please reach out to me internally
Environment data
Module versions
Error output
No response
The text was updated successfully, but these errors were encountered: