Podman Network Persistent

Figured it out, I can now have the Rocky 8 reboot and have the containers persist over reboots.

nmcli con add con-name dockernet-shim type macvlan dev dockernet-shim mode bridge
nmcli con add con-name dockernet-shim type macvlan ifname dockernet-shim ip4 192.168.100.223/32 dev eth0 mode bridge
nmcli con mod dockernet-shim +ipv4.routes "192.168.100.11/32"
nmcli con mod dockernet-shim +ipv4.routes "192.168.100.12/32"
nmcli con mod dockernet-shim +ipv4.routes "192.168.100.15/32"
nmcli con mod dockernet-shim +ipv4.routes "192.168.100.21/32"
nmcli con mod dockernet-shim +ipv4.routes "192.168.100.22/32"
nmcli con up dockernet-shim 

Also found out podman is not a service, you need to create your own service.

podman generate systemd --new --name WEB1 > /etc/systemd/system/web1.service
podman generate systemd --new --name WEB2 > /etc/systemd/system/web2.service
systemctl daemon-reload
systemctl enable web1
systemctl enable web2

Now need to figure out USB Rocky 8 Kickstart Boot.

Also made first payment for a new shed.

Weight: 342.2

This entry was posted in New Toys, Technical, Training, Virtualization, Weigh In. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.