@@ -35,6 +35,9 @@ brew install socket_vmnet
35
35
brew tap homebrew/services
36
36
# sudo is necessary for the next line
37
37
sudo brew services start socket_vmnet
38
+
39
+ # Export the environment variable
40
+ export PATH=" $( brew --prefix) /opt/socket_vmnet/bin:${PATH} "
38
41
```
39
42
40
43
## Test
@@ -67,7 +70,7 @@ sudo brew services restart socket_vmnet
67
70
3. Boot QEMU to install Ubuntu.
68
71
69
72
` ` ` shell
70
- socket_vmnet_client /opt/homebrew/ var/run/socket_vmnet \
73
+ socket_vmnet_client " $( brew --prefix ) / var/run/socket_vmnet" \
71
74
qemu-system-aarch64 \
72
75
-machine virt,accel=hvf \
73
76
-cpu host \
@@ -83,7 +86,7 @@ sudo brew services restart socket_vmnet
83
86
# Boot Ubuntu in QEMU
84
87
85
88
` ` ` shell
86
- socket_vmnet_client /opt/homebrew/ var/run/socket_vmnet \
89
+ socket_vmnet_client " $( brew --prefix ) / var/run/socket_vmnet" \
87
90
qemu-system-aarch64 \
88
91
-machine virt,accel=hvf \
89
92
-cpu host \
@@ -97,6 +100,33 @@ socket_vmnet_client /opt/homebrew/var/run/socket_vmnet \
97
100
98
101
# Log into the server by SSH
99
102
100
- ` ` ` shell
101
- ssh 192.168.105.2
102
- ` ` `
103
+ 1. Get the name of the network device.
104
+
105
+ ` ` ` shell
106
+ $ ip link
107
+
108
+ 1: lo: < LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
109
+ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
110
+ 2: enp0s1: < BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
111
+ link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
112
+ ` ` `
113
+
114
+ We can see the name of the network device is ` enp0s1` .
115
+
116
+ 2. Get the IP address.
117
+
118
+ ` ` ` shell
119
+ $ ip route
120
+
121
+ default via 192.168.105.1 dev enp0s1 proto dhcp src 192.168.105.2 metric 100
122
+ 192.168.105.0/24 dev enp0s1 proto kernel scope link src 192.168.105.2 metric 100
123
+ 192.168.105.1 dev enp0s1 proto dhcp scope link src 192.168.105.2 metric 100
124
+ ` ` `
125
+
126
+ We can see the IP address is ` 192.168.105.2` .
127
+
128
+ 3. Log into the server
129
+
130
+ ` ` ` shell
131
+ ssh 192.168.105.2
132
+ ` ` `
0 commit comments