{"record":{"id":"b107bd7f1d4d8cdc","repo":"lima-vm/lima","slug":"degraded-status-v","errorCode":null,"errorMessage":"degraded, status=%+v","messagePattern":"degraded, status=%\\+v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/instance/start.go","lineNumber":409,"sourceCode":"\t\t\t\tlogrus.Infof(\"[cloud-init] %s\", progress.LogLine)\n\t\t\t}\n\n\t\t\tif progress.Completed {\n\t\t\t\tcloudInitCompleted = true\n\t\t\t\tlogrus.Infof(\"Cloud-init progress monitoring done.\")\n\t\t\t}\n\t\t}\n\t\tif len(ev.Status.Errors) > 0 {\n\t\t\tlogrus.Errorf(\"%+v\", ev.Status.Errors)\n\t\t}\n\t\tif ev.Status.Exiting {\n\t\t\terr = fmt.Errorf(\"exiting, status=%+v (hint: see %#q)\", ev.Status, haStderrPath)\n\t\t\treturn true\n\t\t} else if ev.Status.Running {\n\t\t\treceivedRunningEvent = true\n\t\t\tif ev.Status.Degraded {\n\t\t\t\tlogrus.Warnf(\"DEGRADED. The VM seems running, but file sharing and port forwarding may not work. (hint: see %#q)\", haStderrPath)\n\t\t\t\terr = fmt.Errorf(\"degraded, status=%+v\", ev.Status)\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tif xerr := runAnsibleProvision(ctx, inst); xerr != nil {\n\t\t\t\terr = xerr\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tif showProgress && !cloudInitCompleted {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif !isLaunchingShell(ctx) {\n\t\t\t\tif *inst.Config.Plain {\n\t\t\t\t\tlogrus.Infof(\"READY. Run `ssh -F %#q %s` to open the shell.\", inst.SSHConfigFile, inst.Hostname)\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Infof(\"READY. Run `%s` to open the shell.\", LimactlShellCmd(inst.Name))\n\t\t\t\t}","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/instance/start.go#L391-L427","documentation":"The hostagent reported the VM as Running but with Degraded=true, meaning core VM operation works but auxiliary features (file sharing, port forwarding) failed. limactl logs a prominent DEGRADED warning with a hint at ha.stderr.log and returns this error so `limactl start` exits non-zero even though the instance is technically up.","triggerScenarios":"watchHostAgentEvents receives a Running event with Degraded=true — typically guestagent tools like sshfs/reverse-sshfs, sudo-less mount setup, or port-forwarding helper failing inside the guest.","commonSituations":"macOS hosts without the virtiofs/sshfs prerequisites, guests missing required packages, restricted sudo policies preventing mounting, or firewall blocking the port-forwarding channel.","solutions":["Read ha.stderr.log for the degraded reason (usually mount or port-forward failure)","Fix guest prerequisites (install/reinstall virtiofs or sshfs support, fix sudoers)","Adjust lima.yaml to disable the failing feature (e.g. change mountType) and restart","The instance may still be usable: check `limactl list` and continue, or `limactl stop -f` and retry"],"exampleFix":"// after degraded error\nif strings.Contains(err.Error(), \"degraded, status=\") {\n    logrus.Warn(\"instance running without file sharing/port forwarding\")\n    // inspect: limactl shell <inst> -- ls /tmp/lima\n}","handlingStrategy":"try-catch","validationCode":"// nothing to pre-validate; detect degraded outcome after start\nif err != nil && strings.Contains(err.Error(), \"degraded, status=\") { /* instance is up but limited */ }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"degraded\") {\n    logrus.Warn(\"VM running but degraded: file sharing/port forwarding may not work\")\n    return nil // or stop and retry depending on your needs\n}","preventionTips":["Install required guest tooling (sshfs/virtiofs) in your images","Use mountType supported by your host OS","Test port forwarding in CI to catch regressions","Review ha.stderr.log after every start"],"tags":["hostagent","degraded","port-forwarding","file-sharing"],"backgroundTag":"vm-degraded-mode","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}