crc-org / vfkit

Apache License 2.0
130 stars 25 forks source link

how to used bridged network configuration #144

Closed gkyildirim closed 4 months ago

gkyildirim commented 4 months ago

I'dl like to bridge my vm's interface to my host interface (ie en0). So I can have a vm-to-vm networking. I could not figure out how to do that with vfkit? Is it --device virtio-net,fd ? If so would you please give an example? I have read VZFileHandleNetworkDeviceAttachment but could not figure it out :/

If one must use user mode networking such as gvisor-tap-vsock I would say speed is not much as compared to alternatives. A brief comparison can be found here: https://github.com/lima-vm/lima/issues/2348

cfergeau commented 4 months ago

I actually have a branch adding bridge networking support https://github.com/cfergeau/vfkit/tree/bridge , this makes use of VZBridgedNetworkDeviceAttachment

However, the code in this branch won't' work as is, as using bridged networking requires an entitlement only Apple can grant:

To use this attachment, your app must have the com.apple.vm.networking entitlement. This entitlement is restricted to developers of virtualization software. To request this entitlement, contact your Apple representative.

gkyildirim commented 4 months ago

Thanks for the info, much appreciated. In place access to this speed would be great IMHO.