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

New-AzVM installs BGInfo extension automatically #25517

Open
kegregoi opened this issue Jul 11, 2024 · 3 comments
Open

New-AzVM installs BGInfo extension automatically #25517

kegregoi opened this issue Jul 11, 2024 · 3 comments
Assignees
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.

Comments

@kegregoi
Copy link

kegregoi commented Jul 11, 2024

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

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.13.2                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}  
Script     7.1.0                 Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Ad… 
Script     7.1.0                 Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationG… 
Script     6.12.1                Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment,

Error output

No response

@kegregoi kegregoi added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jul 11, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jul 11, 2024
@isra-fel isra-fel added Compute - VM Service Attention This issue is responsible by Azure service team. labels Jul 18, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT.

1 similar comment
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT.

@TravisCragg-MSFT TravisCragg-MSFT self-assigned this Jul 18, 2024
@TravisCragg-MSFT
Copy link
Member

@kegregoi This is an behavior left over from when this extension used to be default. We are working now to remove this default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants