Skip to content

Commit 20d8ee1

Browse files
committed
README.md: add some explanation
Signed-off-by: Angelo Failla <pallotron@gmail.com>
1 parent 9457ec6 commit 20d8ee1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ sudo launchctl bootout system /Library/LaunchDaemons/io.github.lima-vm.socket_vm
351351
sudo rm /Library/LaunchDaemons/io.github.lima-vm.socket_vmnet.bridged.${BRIDGED}.plist
352352
```
353353

354+
### No DHCP mode
355+
356+
By passing `--vmnet-network-uuid=<UUID>` and `--vmnet-mode=host` to `socket_vmnet`, the internal DHCP will be disabled.
357+
This is useful for situations where the users want to create a network with statically assigned IP addresses or where another VMs is running its own DHCP server.
358+
This mode does not come with a launchd service.
359+
354360
## FAQs
355361

356362
### Why does `socket_vmnet` require root?
@@ -387,13 +393,20 @@ On the other hand, `socket_vmnet` does not require the entire QEMU process to ru
387393

388394
### How to use static IP addresses?
389395

396+
Two options:
397+
398+
#### By using a shorter DHCP range
390399
When `--vmnet-gateway=IP` is set to "192.168.105.1", the whole subnet (192.168.105.2-192.168.105.254) is used as the DHCP range.
391400

392401
To use static IP addresses, limit the DHCP range with `--vmnet-dhcp-end=IP`.
393402

394403
For example, `--vmnet-gateway=192.168.105.1 --vmnet-dhcp-end=192.168.105.100` allows using `192.168.105.101-192.168.105.254`
395404
as non-DHCP static addresses.
396405

406+
#### By setting up network UUID (only in vmnet.host mode)
407+
408+
When `--vmnet-mode=host` and `--vmnet-network-uuid` are set, the internal DHCP is disabled and you are free to use static IP addresses. You still need to set `--vmnet-gateway=IP` to avoid collision with other vmnet networks.
409+
397410
### How to reserve DHCP addresses?
398411

399412
- Decide a unique MAC address for the VM, e.g. `de:ad:be:ef:00:01`.

0 commit comments

Comments
 (0)