-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Allow specifying vmnet network UUID to disable DHCP (on vmnet.h… #141
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
Open
pallotron
wants to merge
5
commits into
lima-vm:master
Choose a base branch
from
pallotron:feature/no_dhcp_issue_139
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+85
−40
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,27 +12,29 @@ Unlike `vde_vmnet`, `socket_vmnet` does not depend on VDE. | |
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
- [Install](#install) | ||
- [From binary](#from-binary) | ||
- [From source](#from-source) | ||
- [From Homebrew](#from-homebrew) | ||
- [From MacPorts](#from-macports) | ||
- [Usage](#usage) | ||
- [QEMU](#qemu) | ||
- [Lima](#lima) | ||
- [Advanced usage](#advanced-usage) | ||
- [Multi VM](#multi-vm) | ||
- [Bridged mode](#bridged-mode) | ||
- [FAQs](#faqs) | ||
- [Why does `socket_vmnet` require root?](#why-does-socket_vmnet-require-root) | ||
- [Is it possible to run `socket_vmnet` with SETUID?](#is-it-possible-to-run-socket_vmnet-with-setuid) | ||
- [How is socket_vmnet related to vde_vmnet?](#how-is-socket_vmnet-related-to-vde_vmnet) | ||
- [How is socket_vmnet related to QEMU-builtin vmnet support?](#how-is-socket_vmnet-related-to-qemu-builtin-vmnet-support) | ||
- [How to use static IP addresses?](#how-to-use-static-ip-addresses) | ||
- [How to reserve DHCP addresses?](#how-to-reserve-dhcp-addresses) | ||
- [IP address is not assigned](#ip-address-is-not-assigned) | ||
- [Links](#links) | ||
- [Troubleshooting](#troubleshooting) | ||
- [socket_vmnet: vmnet.framework support for rootless and VDE-less QEMU](#socket_vmnet-vmnetframework-support-for-rootless-and-vde-less-qemu) | ||
- [Install](#install) | ||
- [From binary](#from-binary) | ||
- [From source](#from-source) | ||
- [From Homebrew](#from-homebrew) | ||
- [From MacPorts](#from-macports) | ||
- [Usage](#usage) | ||
- [QEMU](#qemu) | ||
- [Lima](#lima) | ||
- [Advanced usage](#advanced-usage) | ||
- [Multi VM](#multi-vm) | ||
- [Bridged mode](#bridged-mode) | ||
- [FAQs](#faqs) | ||
- [Why does `socket_vmnet` require root?](#why-does-socket_vmnet-require-root) | ||
- [Is it possible to run `socket_vmnet` with SETUID?](#is-it-possible-to-run-socket_vmnet-with-setuid) | ||
- [How is socket_vmnet related to vde_vmnet?](#how-is-socket_vmnet-related-to-vde_vmnet) | ||
- [How is socket_vmnet related to QEMU-builtin vmnet support?](#how-is-socket_vmnet-related-to-qemu-builtin-vmnet-support) | ||
- [How to use static IP addresses?](#how-to-use-static-ip-addresses) | ||
- [How to reserve DHCP addresses?](#how-to-reserve-dhcp-addresses) | ||
- [IP address is not assigned](#ip-address-is-not-assigned) | ||
- [How to setup a vmnet host network without DHCP?](#how-to-setup-a-vmnet-host-network-without-dhcp) | ||
- [Links](#links) | ||
- [Troubleshooting](#troubleshooting) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
|
@@ -122,8 +124,7 @@ Run the following command to start the daemon: | |
sudo /opt/socket_vmnet/bin/socket_vmnet --vmnet-gateway=192.168.105.1 /var/run/socket_vmnet | ||
``` | ||
|
||
> [!TIP] | ||
> `sudo make install` is also available in addition to `sudo make install.bin`. | ||
> [!TIP] > `sudo make install` is also available in addition to `sudo make install.bin`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, this is just formatting, vscode ran this as I saved the file to update the TOC |
||
> The former one installs the launchd service (see below) too. | ||
|
||
<details> | ||
|
@@ -430,6 +431,17 @@ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd | |
/usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd | ||
``` | ||
|
||
### How to setup a vmnet host network without DHCP? | ||
|
||
You may need to disable the vmnet framework's DHCP to: | ||
|
||
- Create a host network where all VMs have static IPs. | ||
- Run a custom DHCP server on one VM to assign IPs to others on the same network. | ||
|
||
To disable the macOS DHCP you must use `--vmnet-mode=host` and provide a `--vmnet-network-idenfitier` UUID. | ||
You **_must not_** provide `--vmnet-gateway`. That is the signal to Apple's vmnet.framework to enable MacOS DHCP. | ||
You can use `--vmnet-network-idenfitier=random` to get a random UUID assigned. | ||
|
||
## Links | ||
|
||
- https://developer.apple.com/documentation/vmnet | ||
|
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just formatting, vscode ran this as I saved the file to update the TOC