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

vz: support "lima: shared" networking using VZNATNetworkDeviceAttachment #1206

Closed
wants to merge 1 commit into from

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Nov 25, 2022

See examples/experimental/vz.yaml .

Unlike QEMU, VZ does not need sudoers for enabling vmnet.

Fix #1161


No support for bridged mode, as VZBridgedNetworkDeviceAttachment requires the com.apple.vm.networkingentitlement which needs to contact an Apple representative.

Probably we need to use socket_vmnet too for supporting bridged mode with VZ.
(The socket protocol is different, so we need to modify socket_vmnet)

@AkihiroSuda
Copy link
Member Author

cc @balajiv113 @jandubois

See `examples/experimental/vz.yaml` .

Unlike QEMU, VZ does not need sudoers for enabling vmnet.

Fix issue 1161

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

@AkihiroSuda
My suggestion here would be to provide a new config like networks.vzNAT: true (Like we discussed before). And this will be supported only for vz driver

Reasons for this would be, If we use lima: shared for vzNAT, even with this we cannot communicate across vm's (qemu vm talking to vz vm). But from config it clearly state lima: shared not driver specific

Once we are able to provide support for vz in socket_vmnet (Surely doable) then it will provide support for cross driver communication as well. Using lima: shared for vzNAT now would cause confusions at that time.

What is needed to provide support for vz in socket_vmnet ?
This is from my initial analysis, i might be missing something as well,

  1. vz network packets doesn't contain header packet of 4bytes (contains length of original packet in qemu). So some logics have to be modified
  2. dgram_socket based connectivity (Optional, as we can pipe dgram packets to unix socket as well)

@AkihiroSuda
Copy link
Member Author

we cannot communicate across vm's (qemu vm talking to vz vm)

Why can't?

@AkihiroSuda
Copy link
Member Author

Opened a new PR:

@AkihiroSuda AkihiroSuda removed this from the v0.14 milestone Nov 25, 2022
@balajiv113
Copy link
Member

we cannot communicate across vm's (qemu vm talking to vz vm)

Why can't?

I thought since the vmnet interfaces will be different for vzNAT and the socket_vmnet. So they maynot support cross communication

@AkihiroSuda
Copy link
Member Author

Looks like VZ uses vmnet_enable_isolation_key and it is not configurable 😞
(/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/vmnet.framework/Versions/Current/Headers/vmnet.h)

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.

vz: support "vznat" network
2 participants