rancher-desktop: "Starting virtual machine" step fails due to SSH socket path being too long.
Rancher Desktop shows the “Starting virtual machine” until timeout.
~/Library/Application\ Support/rancher-desktop/lima/0/ha.stderr.log contains the following lines:
{"level":"debug","msg":"stdout=\"\", stderr=\"unix_listener: path \\\"/Users/od.andreas.zitzelsberger/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt\\\" too long for Unix domain socket\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"unix_listener: path \\\"/Users/XXXXXXXXXXXXXXXXXXXXXXXX/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt\\\" too long for Unix domain socket\\r\\n\": exit status 255","time":"2021-10-14T15:28:04+02:00"}
with XXXXXXXXXXXXXXXXXXXXXXXX being my user name. Please note that the path /Users/XXXXXXXXXXXXXXXXXXXXXXXX/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt has 109 characters. The path length for Unix Domain Sockets is limited to 108 characters (Linux) or 104 characters (Mac). Unfortunately, my user name is managed and cannot be changed. While the user name is long, I believe it’s length is not uncommon.
To Reproduce
- Start Rancher Desktop on a Mac with a user name that has 21 characters or more.
Result Rancher Desktop shows the “Starting virtual machine” until timeout.
Expected behaviour Rancher Desktop starts up properly.
Screenshots

Setup (please complete the following information):
- macOS 11.6
- Rancher Desktop 0.6.0
- Kubernetes 1.21.5
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 39 (8 by maintainers)
Commits related to this issue
- Use symlink to shorten Lima config path Fixes #797 Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> — committed to jsoref/rancher-desktop by jsoref 5 years ago
It should be possible to work around it now, even though it is not automatic.
I’ve just moved the lima home directory to
~/.rdlima:Please try that and let me know if it fixes the issue for you!
Please keep the bug open though, because I think RD should do something like this automatically, but I don’t know when we will get around to it.
This still works as of Feb 7, 2023.
I had some trouble with https://github.com/rancher-sandbox/rancher-desktop/issues/797#issuecomment-996510877, so I post here all my steps. I hope this will help you.
Reset Rancher Desktop: “Troubleshooting / Factory Reset”, close Rancher Desktop or run the following steps before you start Rancher Desktop!
Restart Rancher Desktop Check Rancher Desktop logs Check some context
Restart Rancher Desktop
Docker default context can be set by export environment variable DOCKER_HOST=unix:///Users/<username>/.rd/docker.sock
reopen shell
So have fun
Hi,
Reset kubernetesbutton inside theTroubleshootingsection worked for me (mac m1)I can confirm that the work around works for me. Thanks!
Still occurs on 1.10.0.
Unfortunately true. 😞 The problem is that we have a huge number of open issues, so problems with a simple workaround don’t get prioritized.
Following an upgrade to Rancher 1.14.1, I encountered a similar issue. The workaround to move lima did not resolve. Resetting k8s (and deleting the containers) worked. I’m not currently using k8s so this was okay for me, but might be a show-stopper for anyone who does?
My username is 3 characters, so I think that my problem might be different (I was not seeing the error about the Unix path limit).
@anthonyrea I just heard from somebody last week that it still works. What is the error you are seeing? If you still get the same message as before, then you haven’t created the symlink correctly.
@jandubois’s workaround did not work today for version 1.8.1 on MacOS M1.
instance name \\"0\\" too long: "/Users/xxxxxxxxxxxx.xxxxxxxxxxxx/Library/Application Support/rancher-desktop/lima/0/ssh.sock.1234567890123456" must be less than UNIX_PATH_MAX=104 characters, but is 109Any workarounds for this issue that still work in the newest version?