0

I am creating a kickstart for Rocky 9.3 for deployment. These hosts will have virsh (qemu) to host multiple VMs per host. All these hosts have MAC based DHCP for ens9f0.

I am using below to create a bridge network for these VMs:

network --bootproto=dhcp --device=br0 --ipv6=auto --activate --bridgeslaves=ens9f0 --bridgeopts=priority=32768,stp=yes 

This should create a br0 with ens9f0 and at the end br0 should have DHCP IP and be activated. ens9f0 should be UP but without any IP and br0 should be UP with DHCP ip...

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens9f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000 link/ether 3c:ec:ef:fc:bf:1e brd ff:ff:ff:ff:ff:ff altname enp101s0f0 3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 3c:ec:ef:fc:bf:1e brd ff:ff:ff:ff:ff:ff inet 10.73.119.255/20 brd 10.73.127.255 scope global dynamic noprefixroute br0 valid_lft 604798sec preferred_lft 604798sec inet6 fe80::1607:7351:9b51:4dbf/64 scope link noprefixroute valid_lft forever preferred_lft forever 

But sometimes when they are imaged, both ens9f0 and br0 are activated with the same DHCP IP which the VMs won't have any connectivity.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens9f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 3c:ec:ef:fc:bf:1e brd ff:ff:ff:ff:ff:ff altname enp101s0f0 inet 10.73.119.255/20 brd 10.73.127.255 scope global dynamic noprefixroute ens9f0 valid_lft 418211sec preferred_lft 418211sec inet6 fe80::3eec:efff:fefc:bf1e/64 scope link noprefixroute valid_lft forever preferred_lft forever 3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff inet 10.73.119.255/20 brd 10.73.127.255 scope global dynamic noprefixroute br0 valid_lft 418211sec preferred_lft 418211sec inet6 fe80::1607:7351:9b51:4dbf/64 scope link noprefixroute valid_lft forever preferred_lft forever 

Or sometimes ens9f0 is activated and connected and br0 is DOWN.

When this happens, I manually run nmtui to deactivate ens9f0 and then br0 get DHCP IP and it works fine.

I tried using nmcli in post but nmcli doesn't work properly in kickstart.

I also tried with stp=no and same issue happens.

I also tried to use a one time script at the first boot using nmcli but same issue happens.

Anybody can tell me how to configure this properly in kickstart?

Any help is greatly appreciated.

1 Answer 1

0

I compared what nmtui deactivate changes on ens9f0.nmconnection file.

Since nmcli doesn't work in %post kickstart, then I manually did the same thing using sed append in the same %post kickstart.

sed -i '/type=ethernet/a autoconnect=false\nautoconnect-priority=-100\nautoconnect-retries=1' "/etc/NetworkManager/system-connections/ens9f0.nmconnection" 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.