Check for previous/existing GitHub issues
Issue Type?
I'm not sure
Module Name
avm/res/compute/virtual-machine
(Optional) Module Version
No response
Description
I have mystery problems with AVM VM template(s).
Case: A VM was originally provisioned with AVM VM template version 0.6.0 with one data disk.
I can re-provision the VM as many times as I like with the same template (version).
However, if I run the provision with “WhatIf” parameter I get an error about domain-join extension tags.
InvalidRequestContent
Message
The request content was invalid and could not be deserialized: 'Error converting value "[coalesce(tryGet(parameters('extensionDomainJoinConfig'), 'tags'), parameters('tags'))]" to type 'Microsoft.WindowsAzure.Governance.PolicyService.Models.Policy.TagsValidationDictionary'. Path 'tags'.'.
Yes, we do domain-join the VM during provision.
I have tried to pass an empty object for tag parameter for domain-join, tried to pass a single value and tried without tag. Originally, we didn’t have any additional tags for domain-join extension.
It doesn’t matter do I use AZ CLI, PowerShell or Bicep extension deployment. As long as the provision is run with WhatIf, the provision will fail with error message above.
Case: A VM was originally provisioned with AVM VM template version 0.22.0 with one data disk
Once again, I can re-provision the VM as many times as I like with the same template. Now the WhatIf is working as expected, with no issues.
But now, if I have a VM created with an AVM VM template version 0.6.0, I cannot re-provision the VM with a template version 0.22.0. In case I need to change the VM size or add a disk or anything.
I will get an error:
"code": "PropertyChangeNotAllowed",
"message": "Changing property 'dataDisk.createOption' is not allowed.",
"target": "dataDisk.createOption"
What I have noticed so far is when compared to how the VM looks when it is provisioned with different template versions. Otherwise, the same template, just updated the AVM module version from 0.6.0 -> 0.22.0.
Data disk configuration in version 0.6.0 template provisioned VM (exported in the portal):
dataDisks: [
{
lun: 0
name: 'disk-data-01'
createOption: 'Empty'
caching: 'ReadOnly'
managedDisk: {
storageAccountType: 'Premium_LRS'
id: <data disk ID>
}
deleteOption: 'Detach'
diskSizeGB: 64
toBeDetached: false
}
]
Data disk configuration in version 0.22.0 template provisioned VM (exported in the portal):
dataDisks: [
{
lun: 0
name: 'disk-data-01'
createOption: 'Attach'
caching: 'ReadOnly'
managedDisk: {
storageAccountType: 'Premium_LRS'
id: <data disk ID>
}
deleteOption: 'Delete'
diskSizeGB: 64
toBeDetached: false
}
]
The createOption is different and that explains the error message. But why it's different?
Any advise/help is welcome.
(Optional) Correlation Id
No response
Check for previous/existing GitHub issues
Issue Type?
I'm not sure
Module Name
avm/res/compute/virtual-machine
(Optional) Module Version
No response
Description
I have mystery problems with AVM VM template(s).
Case: A VM was originally provisioned with AVM VM template version 0.6.0 with one data disk.
I can re-provision the VM as many times as I like with the same template (version).
However, if I run the provision with “WhatIf” parameter I get an error about domain-join extension tags.
Yes, we do domain-join the VM during provision.
I have tried to pass an empty object for tag parameter for domain-join, tried to pass a single value and tried without tag. Originally, we didn’t have any additional tags for domain-join extension.
It doesn’t matter do I use AZ CLI, PowerShell or Bicep extension deployment. As long as the provision is run with WhatIf, the provision will fail with error message above.
Case: A VM was originally provisioned with AVM VM template version 0.22.0 with one data disk
Once again, I can re-provision the VM as many times as I like with the same template. Now the WhatIf is working as expected, with no issues.
But now, if I have a VM created with an AVM VM template version 0.6.0, I cannot re-provision the VM with a template version 0.22.0. In case I need to change the VM size or add a disk or anything.
I will get an error:
What I have noticed so far is when compared to how the VM looks when it is provisioned with different template versions. Otherwise, the same template, just updated the AVM module version from 0.6.0 -> 0.22.0.
Data disk configuration in version 0.6.0 template provisioned VM (exported in the portal):
Data disk configuration in version 0.22.0 template provisioned VM (exported in the portal):
The createOption is different and that explains the error message. But why it's different?
Any advise/help is welcome.
(Optional) Correlation Id
No response