Initial support for external/multiple networks in vmnet host mode #6186
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 adds support for connecting QEMU VMs to specific host networks using the
net-uuid
option (described here). This can be extremely useful when connecting multiple VMs together, or for connecting VMs across virtualisation applications (VMware Fusion/Parallels). Unfortunately, I didn't find such option for the Apple virtualisation APIs, so it's only supported for QEMU VMs. #4190 essentially accomplished this by manually editing the QEMU arguments.Note that using a custom network UUID will disable the DHCP that macOS vmnet would otherwise provide. As of right now, the user is responsible for providing their own DHCP on the network. E.g. by running a VM that provides it, or running a VM in e.g. VMware on the same network.
I've also added a button for importing a VMware Fusion networking configuration. It requires you to browse to and select
/Library/Preferences/VMware Fusion/networking
. All defined networks in there will be added. As mentioned before, I'm not aware of a more idiomatic approach for this. Adding support for other virtualisation applications is possible, but Fusion is my personal daily driver so that's what I know and have.This is my first time writing any Swift code, so please excuse the code quality. I only started reading the basics of Swift a few days ago, so I'm not aware of any of the idiomatic or recommended ways of achieving certain things. I'll take any suggestions on that front.