machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.43k stars 353 forks source link

virtio_9p? #222

Open orent opened 2 years ago

orent commented 2 years ago

The client is built into linux guests and the server is a separate process that uses only simple userspace filesystem access and should be easy to port. IIUC, the missing part is setting up the communication channel over a virtio ring.

Any plans on supporting 9p filesystem access?

Any pointers on where I might start doing it myself?

brad-x commented 2 years ago

@orent if you're feeling adventurous, hyperkit is a pretty direct descendant of XHyve and they've added 9p support (oddly it hasn't been contributed back here.)

https://github.com/moby/hyperkit/commit/20e6d9280b5ca7df73bb7a74410a67575e680198 is a great place to start for bringing support into xhyve itself

brad-x commented 2 years ago

@orent I think we can test building xhyve with elements of the above commit, but I've been failing to find a userspace 9p server to connect it to. Any recommendations?

orent commented 2 years ago

This one is apparently meant to be used with bhyve: https://github.com/conclusiveeng/lib9p

There is a good implementation in qemu, but it is GPLed. I guess it should be OK as a separate executable with source code clearly segregated in a subdirectory, but this is up to you, of course.

There are two projects mentioned in the hyperkit commit in Go and in ocaml.

A rust implementation in Google's crosvm, used as part of Crostini (Linux on ChromeOS). https://chromium.googlesource.com/chromiumos/platform/crosvm

orent commented 2 years ago

lib9p was added to the FreeBSD tree two years ago.