My goal is to create a CIS Oracle linux VM, then add users to that VM. I was trying to add the users using Azure function, the code is below.
string linuxVmAccessExtensionName = "VMAccessForLinux";
string linuxVmAccessExtensionPublisherName = "Microsoft.OSTCExtensions";
string linuxVmAccessExtensionTypeName = "VMAccessForLinux";
string linuxVmAccessExtensionVersionName = "1.4";
linuxVM.Update()
.DefineNewExtension(linuxVmAccessExtensionName)
.WithPublisher(linuxVmAccessExtensionPublisherName)
.WithType(linuxVmAccessExtensionTypeName)
.WithVersion(linuxVmAccessExtensionVersionName)
.Attach()
.Apply();
linuxVM.Update()
.UpdateExtension(linuxVmAccessExtensionName)
.WithProtectedSetting("username", ThirdLinuxUserName)
.WithProtectedSetting("password", ThirdLinuxUserPassword)
.WithProtectedSetting("expiration", ThirdLinuxUserExpiration)
.Parent()
.Apply();
However, I'm getting error - The resource '/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.Compute/virtualMachines/linuxdev' of type 'Microsoft.Compute/virtualMachines' does not support updates to the purchase plan.
Any suggestions how this problem can be resolved? I have tried different suggestions available in different forums but nothing solved the problem. Is the problem with the selected VM image since it's CIS standard image?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…