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

Support VZFileHandleNetworkDeviceAttachment #13

Open
AkihiroSuda opened this issue Nov 25, 2022 · 4 comments
Open

Support VZFileHandleNetworkDeviceAttachment #13

AkihiroSuda opened this issue Nov 25, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Nov 25, 2022

Virtualization.framework provides built-in support for vmnet.framework (without root, for the NAT (shared) mode).

However, it has some drawbacks compared to socket_vmnet:

So, it still makes sense to support socket_vmnet for VZ.

VZFileHandleNetworkDeviceAttachment can be used for this, but its protocol is incompatible with QEMU. (DGRAM sock, without the uint32be length header)

Context:


Probably, CLI will be like socket_vmnet unix:///var/run/socket_vmnet unixgram://var/run/socket_vmnet.unixgram to cover both QEMU socket and VZ socket in a single process (so as to avoid complicating the sudoers file too much)

@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Nov 25, 2022
@balajiv113
Copy link
Member

@AkihiroSuda
If this is not taken up i can give a try with this

@AkihiroSuda
Copy link
Member Author

@balajiv113 Thanks

@balajiv113
Copy link
Member

@AkihiroSuda - I did some progress on this, on working had a thought about one other way,

What if we write a Pipe mechanism to translate vz packets to qemu like packets ?? If we do this, we don't need any changes in socket_vmnet / gvisor. Any network that support qemu should be supported here as well.

translate vz packets to qemu like packets
Thought of doing the following,

  1. Dial to a unix sock and get conn
  2. create sock pair for dgram
  3. read from dgram and write to unix sock with header
  4. read from unix sock and write to dgram without header

One con i could see might drop a bit in performance due to this pipe mechanism but sure it should not be high. Please put down your thoughts on this. If this is good, i can provide this support rather than socket_vmnet changes

@AkihiroSuda
Copy link
Member Author

Sounds good as a workaround, but eventually we have to eliminate that pipe for better performance

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

2 participants