crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.23k stars 231 forks source link

Implement 9P server support for libhvee #3870

Open gbraad opened 8 months ago

gbraad commented 8 months ago

This is a follow-up to #3229, but will provide 9P support through the changes introduced by @mheon; via PR https://github.com/containers/gvisor-tap-vsock/pull/280. They will be moved to another repo which allows us to re-use it via libhvee and CRC

gbraad commented 7 months ago

Not a spike anymore as changes has been introduced to Podman's codebase

cfergeau commented 2 months ago

The relevant code in podman is: https://github.com/containers/podman/blob/main/cmd/podman/machine/client9p.go https://github.com/containers/podman/blob/main/cmd/podman/machine/server9p.go https://github.com/containers/podman/tree/main/pkg/fileserver

vyasgun commented 2 months ago

@cfergeau Just had a chat with @gbraad and I will also be looking into this.

cfergeau commented 2 months ago

9p server code from podman is easy to reuse in crc, even more so with these changes https://github.com/cfergeau/podman/tree/9p Then with https://github.com/cfergeau/crc/blob/f698247126d89819638f6db4975c2e6397a5853d/cmd/crc/cmd/daemon.go#L203-L212 a 9p share is started at daemon startup time, and is reachable from the guest on 192.168.127.1 on port 564.

However the guest part is more problematic, while podman can use mount -t 9p ... to mount the share because it's using fedora, this is not working in our microshift/openshift images because they are RHEL-based, and don't provide support for 9p out of the box. As 9p support is getting more complicated than expected, imo we should be moving forward with https://github.com/crc-org/crc/pull/3824 without 9p support, and work on it as a follow-up.

gbraad commented 1 month ago

we should be moving forward with https://github.com/crc-org/crc/pull/3824 without 9p support, and work on it as a follow-up.

Agree. I would even want to create a new issue for the 9P guest support.