You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/books/lxd_server/06-profiles.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ And then look for the interface with the LAN IP assignment in the 192.168.1.0/24
52
52
valid_lft forever preferred_lft forever
53
53
```
54
54
55
-
So in this case, the interface would be "enp3s0".
55
+
So, in this case, the interface would be "enp3s0".
56
56
57
57
Now let's modify the profile:
58
58
@@ -234,7 +234,7 @@ To do this, we need to gain shell access to the container again:
234
234
lxc exec rockylinux-test-9 bash
235
235
```
236
236
237
-
Next, we are going to create a bash script in `/usr/local/sbin` called "static"
237
+
Next, we are going to create a bash script in `/usr/local/sbin` called "static":
238
238
239
239
```
240
240
vi /usr/local/sbin/static
@@ -251,10 +251,10 @@ The contents of this script are simple:
251
251
/usr/sbin/ip route add default via 192.168.1.1
252
252
```
253
253
254
-
So, what are we doing here? First, we rename eth0 to a new name that we can manage. We have chosen "net0" here. Second, we assign the new static IP that we have allocated for our container. In this case 192.168.1.151. Now we bring up the new "net0" interface. Finally, we need to add the defaultt route for our interface.
254
+
So, what are we doing here? First, we rename eth0 to a new name that we can manage. We have chosen "net0" here. Second, we assign the new static IP that we have allocated for our container. In this case 192.168.1.151. Now we bring up the new "net0" interface. Finally, we need to add the default route for our interface.
255
255
256
256
257
-
Make our script executable with
257
+
Make our script executable with:
258
258
259
259
```
260
260
chmod +x /usr/local/sbin/static
@@ -266,7 +266,7 @@ Next, we add this to root's crontab for the container using the @reboot time:
266
266
@reboot /usr/local/sbin/static
267
267
```
268
268
269
-
Finally, exit the container and restart it
269
+
Finally, exit the container and restart it:
270
270
271
271
```
272
272
lxc restart rockylinux-test-9
@@ -299,7 +299,7 @@ Luckily, In Ubuntu's implementation of Network Manager, the macvlan stack is NOT
299
299
First, just like with our rockylinux-test-9 container, we need to assign the template to our container:
300
300
301
301
```
302
-
lxc profile assign ubuntu-test default,macvlan`
302
+
lxc profile assign ubuntu-test default,macvlan
303
303
```
304
304
305
305
That should be all that is necessary to get a DHCP assigned address. To find out, stop and then start the container again:
0 commit comments