From 0eca9236044113b0cb566a3507212798e19b640b Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 8 Sep 2022 16:26:40 +0400 Subject: [PATCH] Document NAT subnet change procedure (#236) --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 85d689a..e881f23 100644 --- a/README.md +++ b/README.md @@ -268,3 +268,21 @@ This invocation calls the `tart pull` implicitly (if the image is not being pres Tart is limited by functionality of Apple's `Virtualization.Framework`. At the moment `Virtualization.Framework` doesn't support nested virtualization. + +
+ Changing the default NAT subnet + + To change the default network to `192.168.77.1`: + + ``` + sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address -string 192.168.77.1 + ``` + + Note that even through a network would normally be specified as `192.168.77.0`, the [vmnet framework](https://developer.apple.com/documentation/vmnet) seems to treat this as a starting address too and refuses to pick up such network-like values. + + The default subnet mask `255.255.255.0` should suffice for most use-cases, however, you can also change it to `255.255.0.0`, for example: + + ``` + sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Mask -string 255.255.0.0 + ``` +