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

Bridged Networking #138

Closed
bdwyertech opened this issue Oct 5, 2023 · 7 comments
Closed

Bridged Networking #138

bdwyertech opened this issue Oct 5, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@bdwyertech
Copy link

Is your feature request related to a problem? Please describe.
Bridged networking support. It looks like this is partially implemented, but I cannot find an example using NewBridgedNetworkDeviceAttachment.

@bdwyertech bdwyertech added the enhancement New feature or request label Oct 5, 2023
@Code-Hex
Copy link
Owner

Code-Hex commented Oct 9, 2023

@bdwyertech Hi 👋
I don't think we couldn't use BridgedNetwork because this is required permission for vmnet:

https://developer.apple.com/forums/thread/710763

@bdwyertech
Copy link
Author

OK, that makes sense. Looks like that is some kind of special entitlement that only a VMware or Parallels could get.

@bdwyertech
Copy link
Author

@Code-Hex quick question, I see in the examples a way to create a unix socket which translates to a port in the guest machine -- is it possible to share a Unix socket between the host and the guest? I can do this with Hyperkit, trying to figure out how to achieve same with this lib.

Thanks,
Brian

@bdwyertech
Copy link
Author

Maybe related: linuxkit/linuxkit#3952

@Code-Hex
Copy link
Owner

@cfergeau
Copy link
Contributor

cfergeau commented Oct 11, 2023

@Code-Hex quick question, I see in the examples a way to create a unix socket which translates to a port in the guest machine -- is it possible to share a Unix socket between the host and the guest? I can do this with Hyperkit, trying to figure out how to achieve same with this lib.

This is getting off-topic for this issue (not a problem, just pointing out we could have this discussion elsewhere ;)

Unix socket sharing is not directly supported by Code-Hex/vz nor by Apple Virtualization Framework, but can be implemented on top of it. When you have a VM running with Code-Hex/vz, you can create a unix-unix tunnel in a variety of ways. One possibility is using virtio-vsock as suggested by Kei. You'd need code in the guest to do vsock <-> unix.

podman implements this over SSH, this removes the need for dedicated guest code, and is also hypervisor-agnostic. The code can be found in https://github.com/containers/gvisor-tap-vsock/tree/main/pkg/sshclient

@cfergeau
Copy link
Contributor

OK, that makes sense. Looks like that is some kind of special entitlement that only a VMware or Parallels could get.

Some discussion related to bridge networking happened in #61 (comment)
Apparently it might be possible to workaround the entitlement if you use sudo.

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

No branches or pull requests

3 participants