VM in HostedService contains Extension BGInfo version 1.* which is an XML extension. XML extensions are not supported in Azure Resource

Recently I was consulting for an Enterprise customer that wanted to move a number of their resources from Classic to Resource manager portal.
This is the migration path & step by step process that I followed
My previous post that explains the step by step process 
Mircosoft link that has some steps missing

During the migration i faced several Error & Warning message. 1 of the error message was below

VM in HostedService nmlinffsproxy contains Extension BGInfo version 1.* which is an XML extension. XML extensions are not supported in Azure Resource
Manager. It is recommended to uninstall it from the VM. Alternatively, it will be automatically uninstalled during migration.

Fix 

There are several ways to fix this error message. This error message talks about bginfo that is currently installed in the VM that you wanting to migrate and bginfo cant be migrated. BGinfo is installed as an extension. to remove the extension, Go to Azure ARM portal, search for the VM from the VM search console, you will find the VM is marked as vmname (classic). now click on the VM and on the right hand side you will see extensions. click on extensions, and again on the right hand pane you will see a number of extensions listed. in there you will find BGinfo that you can delete.

2nd option to remove bginfo is via powershell.

A quick search around MSDN came up with the command for removing the BGInfo extension:

Get-AzureVM -ServiceName “cloudservice” -name “vmname” | Set-AzureVMBGInfoExtension -Disable -ReferenceName “BGInfo” | Update-AzureVM

Alas, it wasn’t going to be that easy and I was presented with this lovely error:

BadRequest: Cannot upgrade a resource extension reference BGInfo in Role vmname to state Disable.

Since that failed, i want to try the uninstall using a different command as shown below

VM1 = Get-AzureVM -ServiceName “cloudservice” -Name “vmname”
Set-AzureVMBGInfoExtension -VM $VM1 –Uninstall -ReferenceName “BGInfo” | Update-AzureVM

Even that threw up an error as well. I then proceed to the same above command but i put in -debug at the end which showed me something about unable to remove version 1 of bginfo. so that got me curious and i wanted to see what version of bginfo I have

Get-AzureVM -ServiceName “cloudservice” -name “vmname” | Get-AzureVMBGInfoExtension

Now this makes sense, so this means, i have to upgrade to version 2 before i can uninstall it

Get-AzureVM -ServiceName “cloudservice” -name “vmname” | Set-AzureVMBGInfoExtension | Update-AzureVM

Now i look at version number and see below

Now I want to remove this guys , so supply below command

$VM1 = Get-AzureVM -ServiceName “cloudservice” -Name “vmname”
Set-AzureVMBGInfoExtension -VM $VM1 –Uninstall -ReferenceName “BGInfo” | Update-AzureVM

This now looks good
Thats it. so looks like removing via the portal is a lot easier.

My Previous post talks about how to migrate a VNET from ASM to ARM

One Response to VM in HostedService contains Extension BGInfo version 1.* which is an XML extension. XML extensions are not supported in Azure Resource

  1. […] Previous post talks about how to remove BGINFO extension from a VM when migrating VM from ASM to […]

Leave a Reply

Your email address will not be published. Required fields are marked *