Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4757 +/- ##
=======================================
Coverage 87.50% 87.50%
=======================================
Files 258 258
Lines 14127 14127
=======================================
Hits 12361 12361
Misses 1766 1766 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3f926da to
9f839da
Compare
be162d1 to
5b0a04c
Compare
f6543d8 to
3f74c3d
Compare
Persisting and saving a UUID would cause DHCP to assign a static IP address. Not something Multipass supports.
Improvements are inspried by [vmnet-helper](https://github.com/nirs/vmnet-helper)
Crediting [vmnet-helper](https://github.com/nirs/vmnet-helper) and listing modifications to original implementation
5b0a04c to
5621123
Compare
jimporter
requested changes
Apr 3, 2026
Contributor
jimporter
left a comment
There was a problem hiding this comment.
I don't have a lot of knowledge about Apple's vmnet, so I just have some more general comments below.
Comment on lines
+91
to
+111
| auto bind_endpoint = [&](std::vector<uint8_t>& buffers, | ||
| std::vector<vmpktdesc>& packets, | ||
| std::vector<iovec>& iovs, | ||
| std::vector<msghdr_x>& msgs) { | ||
| buffers.resize((size_t)packet_count * max_packet_bytes); | ||
| packets.resize(packet_count); | ||
| iovs.resize(packet_count); | ||
| msgs.resize(packet_count); | ||
| for (int i = 0; i < packet_count; i++) | ||
| { | ||
| iovs[i].iov_base = buffers.data() + (size_t)i * max_packet_bytes; | ||
| iovs[i].iov_len = max_packet_bytes; | ||
| packets[i].vm_pkt_iov = &iovs[i]; | ||
| packets[i].vm_pkt_iovcnt = 1; | ||
| msgs[i].msg_hdr.msg_iov = &iovs[i]; | ||
| msgs[i].msg_hdr.msg_iovlen = 1; | ||
| } | ||
| }; | ||
|
|
||
| bind_endpoint(host_buffers, host_packets, host_iovs, host_msgs); | ||
| bind_endpoint(vm_buffers, vm_packets, vm_iovs, vm_msgs); |
Contributor
There was a problem hiding this comment.
Then bind_endpoint could be a method on VmnetBuffers, so here you'd just call:
host.bind_endpoint();
vm.bind_enpoint();5621123 to
c11eb18
Compare
c11eb18 to
72f75f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds supports for using additional network interfaces when using the
applevzbackend driver.This implementation of vmnet network interfaces was largely inspired by the following existing works:
Necessary modifications to integrate this code into Multipass is outlined at the top of
applevz_vmnet.mm, but all credit for unmodified code goes to the original author.See the vmnet documentation for more reading on vmnet API usage.
Once #4312 is merged into
mainand the interactions with theAvailabilityZoneManageris more finalized, this implementation can be easily extended to support shared network interfaces.MULTI-2259
MULTI-2263