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

qemu: use 9p by default #1953

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 26, 2023

qemu: 9p: graduate from experimental

template://experimental/9p will be removed right before releasing Lima v1.0.


default.yaml: stop discouraging writable mounts (for 9p and virtiofs)

Setting writable: true is still discouraged for reverse-sshfs due to
potential connectivity issues, but it should be fine for 9p (virtio-9p-pci)
and virtiofs.


qemu: use 9p by default

Templates for the following distro are updated to continue using reverse-sshfs,
as 9p is not available on them.

  • AlmaLinux
  • CentOS Stream
  • Debian
  • openSUSE
  • Oracle Linux
  • Rocky Linux

Warning

Existing instances of the distros above will need running the following command:

limactl edit --mount-type=reverse-sshfs <NAME>

Close #971

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Setting `writable: true` is still discouraged for reverse-sshfs due to
potential connectivity issues, but it should be fine for 9p (virtio-9p-pci)
and virtiofs.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Templates for the following distro are updated to continue using reverse-sshfs,
as 9p is not available on them.
- AlmaLinux
- CentOS Stream
- Debian
- openSUSE
- Oracle Linux
- Rocky Linux

Close issue 971

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks fine, but I have concerns about how this seems to break existing instances.

I've created a debian-12 instance with HEAD of master. I started and stopped the instance twice, and it worked fine.

I then switched to this PR branch and tried to start the instance. It hangs with Waiting for the essential requirement 1 of 3: "ssh".

I stopped the instance and modified the mount type with

$ limactl edit --mount-type reverse-sshfs debian-12

Trying to start the instance again, it still hangs with Waiting for the essential requirement 1 of 5: "ssh". The fact that it now list "1 of 5" instead of "1 of 3" shows that the mount type has been set correctly.

I stop once more, and switch back to the master branch. The instance still does not start again.

I realize that this issue exists independently of this PR, but it seems like changing the default can result in permanent damage to an instance. I haven't investigated what might be causing this.

This was on macOS Monterey 12.7.1 on Intel.

I have some other idea about avoiding the automatic change to existing instances, or at least adding a warning when waiting for requirements, but maybe the failure to switch the debian image at all should be resolved first.

@@ -1,3 +1,11 @@
# ⚠️ ⚠️ ⚠️ `template://experimental/9p` will be removed in in Lima v1.0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# ⚠️ ⚠️ ⚠️ `template://experimental/9p` will be removed in in Lima v1.0,
# ⚠️ ⚠️ ⚠️ `template://experimental/9p` will be removed in Lima v1.0,

#
# Use the following command instead:
# ```
# limactl create --vm-type=qemu --mount-type=9p template://default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just said that 9p is the default for qemu, so

Suggested change
# limactl create --vm-type=qemu --mount-type=9p template://default
# limactl create --vm-type=qemu template://default

@AkihiroSuda
Copy link
Member Author

avoiding the automatic change to existing instances,

Yes, I wanted to do this, but couldn't figure out how we could implement this

@jandubois
Copy link
Member

avoiding the automatic change to existing instances,

Yes, I wanted to do this, but couldn't figure out how we could implement this

We can write a lima.version file in the instance directory during limactl create. We look for the file during limactl start. If the file is missing, we assume the version is 0.18.0.

That way we can apply default settings based on the version of Lima used to create the instance.

We never update lima.version; it represents the version used to create the instance, not the version used to run it.

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

Successfully merging this pull request may close these issues.

v1.0 roadmap: change the default mount driver from reverse-sshfs to 9p (for QEMU) and virtiofs (for vz)
2 participants