Skip to content

Commit 5bfbb70

Browse files
committed
site: Document vfkit network options
1 parent 7bc8069 commit 5bfbb70

File tree

1 file changed

+89
-1
lines changed

1 file changed

+89
-1
lines changed

site/content/en/docs/drivers/vfkit.md

+89-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,77 @@ aliases:
77

88
## Overview
99

10-
[VFKit](https://github.com/crc-org/vfkit) is an open-source program for macOS virtualization, optimized for lightweight virtual machines and container deployment.
10+
[VFKit](https://github.com/crc-org/vfkit) is an open-source program for
11+
macOS virtualization, optimized for lightweight virtual machines and
12+
container deployment.
13+
14+
## Networking
15+
16+
The vfkit driver has two networking options: `nat` and `vmnet-shared`
17+
and `nat`. The `nat` is always available, but it does not provide access
18+
between minikube clusters. To run multiple clusters or multi-node
19+
clusters you need the `vmnet-shared` network. The `vmnet-shared network
20+
requres the [vmnet-helper](https://github.com/nirs/vmnet-helper), see
21+
installation instructions bellow.
22+
23+
{{% tabs %}}
24+
{{% tab vmnet-shared %}}
25+
26+
### Requirements
27+
28+
Requires macOS 10.15 or later and
29+
[vmnet-helper](https://github.com/nirs/vmnet-helper).
30+
31+
### Install vment-helper
32+
33+
```shell
34+
tag="$(curl -fsSL https://api.github.com/repos/nirs/vmnet-helper/releases/latest | jq -r .tag_name)"
35+
machine="$(uname -m)"
36+
archive="vmnet-helper-$tag-$machine.tar.gz"
37+
curl -LOf "https://github.com/nirs/vmnet-helper/releases/download/$tag/$archive"
38+
sudo tar xvf "$archive" -C / opt/vmnet-helper
39+
rm "$archive"
40+
```
41+
42+
The command downloads the latest release from github and installs it to
43+
`/opt/vmnet-helper`.
44+
45+
> [!IMPORTANT]
46+
> The vmnet-helper executable and the directory where it is installed
47+
> must be owned by root and may not be modifiable by unprivileged users.
48+
49+
### Grant permission to run vmnet-helper
50+
51+
The vment-helper process must run as root to create a vmnet interface.
52+
To allow users in the `staff` group to run the vmnet helper without a
53+
password, you can install the default sudoers rule:
54+
55+
```shell
56+
sudo install -m 0640 /opt/vmnet-helper/share/doc/vmnet-helper/sudoers.d/vmnet-helper /etc/sudoers.d/
57+
```
58+
59+
You can change the sudoers configuration to allow access to specific
60+
users or other groups.
61+
62+
### Usage
63+
64+
```shell
65+
minikube start --driver vfkit --network vmnet-shared
66+
```
67+
68+
{{% /tab %}}
69+
{{% tab builtin %}}
70+
### Usage
71+
72+
```shell
73+
minikube start --driver vfkit [--network nat]
74+
````
75+
76+
The `nat` network is used by default if the `--network` option is not
77+
specified.
78+
79+
{{% /tab %}}
80+
{{% /tabs %}}
1181

1282
## Issues
1383

@@ -31,3 +101,21 @@ New updates to macOS often require an updated vfkit driver. To upgrade:
31101
* To check your current version, run: `vfkit -v`
32102
* If the version didn't change after upgrading verify the correct VFKit is in the path. run: `which vfkit`
33103
104+
### Troubleshooting the vmnet-shared network
105+
106+
Check for errors in vment-helper log:
107+
108+
```shell
109+
$MINIKUBE_HOME/.minikube/machines/MACHINE-NAME/vmnet-helper.log
110+
```
111+
112+
Check that the `vmnet-helper` process is running:
113+
114+
```shell
115+
ps au | grep vmnet-helper | grep -v grep
116+
```
117+
118+
If the helper is not running restart the minikube cluster.
119+
120+
For help with vment-helper please use the
121+
[discussions](https://github.com/nirs/vmnet-helper/discussions).

0 commit comments

Comments
 (0)