Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home directory doesn't get mounted again on reboot #2186

Open
thatportugueseguy opened this issue Feb 6, 2024 · 7 comments
Open

Home directory doesn't get mounted again on reboot #2186

thatportugueseguy opened this issue Feb 6, 2024 · 7 comments

Comments

@thatportugueseguy
Copy link

Description

When rebooting, we lose access to the mount of the host machine home directory (/Users/<user>).

Stopping and starting the vm again seems to fix the issue, it's probably because rebooting skips a few steps that starting and stopping does not, namely:

INFO[0007] [hostagent] Mounting "/Users/ze" on "/Users/ze"

Minimal repro:

INFO[0007] READY. Run `limactl shell debian` to open the shell.

$ limactl shell debian  
ze@lima-debian:/Users/ze/Projects$ sudo reboot

$ limactl shell debian 
bash: line 1: cd: /Users/ze/Projects: No such file or directory
ze@lima-debian:/Users/ze$

Using debian-11 template.

@jandubois
Copy link
Member

You can reboot the VM in the provisioning phase, but afterwards stoping/starting needs to be done via limactl and not just the VM itself.

I don't think there is anything that can be done about this, so I would prefer to close this issue. Thoughts @lima-vm/maintainers ?

@afbjorklund
Copy link
Contributor

Wonder if limactl restart would help ?

Otherwise it would require generating the proper mount command for the new filesystems, and adopt to systemd or openrc or what have you. Might not even be possible, for some drivers. Why do we need the reboot? Muscle memory?

@afbjorklund

This comment was marked as off-topic.

@jandubois
Copy link
Member

The hostagent would have to detect the reboot, and then go through the whole "requirements" processing again once it gets an ssh connections again etc. Seems like a lot of work for something that doesn't seem to have a solid use-case.

Wonder if limactl restart would help ?

I've wanted this a couple of times already, even though I feel it is somewhat redundant.

@thatportugueseguy
Copy link
Author

Why do we need the reboot? Muscle memory?

yeah, on my part it was just bad form and muscle memory. Looking back at it, it makes sense to use reboot only on provisioning, though i'd say it's not super obvious for newcomers and might lead to situations where it's unclear what the problem is.

@AkihiroSuda
Copy link
Member

Is this about reverse-sshfs? virtiofs? 9p?

@jandubois
Copy link
Member

Is this about reverse-sshfs?

It is definitely a problem with reverse-sshfs because the mounting is done by the guest-agent. The other 2 are probably fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants