I'm trying to change my VMSS from:
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2016-Datacenter-with-Containers",
"version": "latest"
}
To:
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServerSemiAnnual",
"sku": "Datacenter-Core-1803-with-Containers-smalldisk",
"version": "latest"
}
The first thing I tried was:
Update-AzureRmVmss -ResourceGroupName "DevServiceFabric" -VMScaleSetName "HTTP" -ImageReferenceSku Datacenter-Core-1803-with-Containers-smalldisk -ImageReferenceOffer WindowsServerSemiAnnual
Which gives me the error:
Update-AzureRmVmss : Changing property 'imageReference.offer' is not allowed. ErrorCode: PropertyChangeNotAllowed
This is confirmed in the docs; you can only set the offer when the scaleset is created.
Next I tried Add-AzureRmServiceFabricNodeType
to add a new node type, thinking I could just delete the old one after. However, this command doesn't seem to allow you to set the OS image. You can only set the VM SKU (In other words, all VMs on your cluster have to have the same OS).
Is there a way to change this without deleting the entire cluster and starting from scratch?