{"record":{"id":"6bb52e1d7b315615","repo":"kubernetes/kops","slug":"found-vmss-without-linux-config","errorCode":null,"errorMessage":"found VMSS without Linux config","messagePattern":"found VMSS without Linux config","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/vmscaleset.go","lineNumber":169,"sourceCode":"\t\treturn nil, fmt.Errorf(\"failed to parse subnet ID %s\", *ipConfig.Properties.Subnet.ID)\n\t}\n\n\tvar loadBalancerID *azure.LoadBalancerID\n\tif ipConfig.Properties.LoadBalancerBackendAddressPools != nil {\n\t\tfor _, i := range ipConfig.Properties.LoadBalancerBackendAddressPools {\n\t\t\tif !strings.Contains(*i.ID, \"api\") {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tloadBalancerID, err = azure.ParseLoadBalancerID(*i.ID)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to parse loadbalancer ID %s\", *i.ID)\n\t\t\t}\n\t\t}\n\t}\n\n\tosProfile := profile.OSProfile\n\tif osProfile.LinuxConfiguration == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without Linux config\")\n\t}\n\tif osProfile.LinuxConfiguration.SSH == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without SSH config\")\n\t}\n\tif osProfile.LinuxConfiguration.SSH.PublicKeys == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without SSH public keys\")\n\t}\n\tsshKeys := osProfile.LinuxConfiguration.SSH.PublicKeys\n\tif len(sshKeys) != 1 {\n\t\treturn nil, fmt.Errorf(\"expecting exactly 1 SSH key for %q, found %d: %+v\", *s.Name, len(sshKeys), sshKeys)\n\t}\n\n\tvar userData []byte\n\tif profile.UserData != nil {\n\t\tuserData, err = base64.StdEncoding.DecodeString(*profile.UserData)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to decode user data: %w\", err)\n\t\t}","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go#L151-L187","documentation":"kOps manages Linux-based nodes, so Find() requires the VMSS osProfile.linuxConfiguration to be set in order to extract SSH settings. If the Azure API returns a scale set without LinuxConfiguration (e.g. it uses Windows, password auth, or an empty osProfile), kOps cannot reconcile it and returns this error.","triggerScenarios":"Find() on a VMSS whose virtualMachineProfile.osProfile.linuxConfiguration is nil — Windows image scale sets, scale sets configured with password-only auth, or resources created outside kops without linuxConfiguration.","commonSituations":"A VMSS in the kops-managed resource group was created/modified by hand or by another tool with Windows or password-based osProfile; kops pointing at the wrong resource group/cluster and picking up a foreign VMSS.","solutions":["Verify the VMSS belongs to this kops cluster: `az vmss show -g <rg> -n <vmss>` and check tags/naming; correct the cluster config if kops is looking at the wrong scale set.","Recreate the scale set from the kops spec: run `kops update cluster --yes` (or `kops rolling-update cluster`) so it is provisioned with linuxConfiguration and SSH keys.","If a custom node image/template dropped linuxConfiguration, fix the template to include linuxConfiguration.disablePasswordAuthentication=true and ssh publicKeys.","Never hand-edit VMSS osProfile in kops-managed clusters."],"exampleFix":"// before (ARM/osProfile)\n\"osProfile\": { \"adminUsername\": \"azureuser\", \"computerNamePrefix\": \"nodes\" }\n// after\n\"osProfile\": { \"adminUsername\": \"azureuser\", \"computerNamePrefix\": \"nodes\", \"linuxConfiguration\": { \"disablePasswordAuthentication\": true, \"ssh\": { \"publicKeys\": [ { \"path\": \"/home/azureuser/.ssh/authorized_keys\", \"keyData\": \"ssh-rsa AAAA...\" } ] } } }","handlingStrategy":"validation","validationCode":"func validateLinuxOSProfile(vmss *compute.VirtualMachineScaleSet) error {\n  os := vmss.Properties.VirtualMachineProfile.OSProfile\n  if os == nil || os.LinuxConfiguration == nil {\n    return fmt.Errorf(\"VMSS %s lacks linuxConfiguration\", fi.ValueOf(vmss.Name))\n  }\n  return nil\n}","typeGuard":"func hasLinuxConfig(os *compute.VirtualMachineScaleSetOSProfile) bool {\n  return os != nil && os.LinuxConfiguration != nil\n}","tryCatchPattern":"vmss, err := tasks.Find(ctx, cloud, rg, name)\nif err != nil {\n  if strings.Contains(err.Error(), \"without Linux config\") {\n    // rebuild the scale set via kops update cluster\n  }\n  return err\n}","preventionTips":["Only use Linux images in kops node instance groups","Never hand-edit VMSS osProfile in kops-managed resource groups","Verify VMSS tags/name before pointing kops at a cluster","Keep custom ARM templates aligned with kops-generated osProfile"],"tags":["azure","vmss","osprofile","ssh"],"backgroundTag":"vmss-missing-linux-config","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}