Unable to connect to second network interface

I installed openSUSE Leap Micro 5.5 - Get openSUSE (qcow2 image) in a Virtual Machine with two network interfaces the first being a bridge and the second being a NAT network, but is not acquiring the ip in this second one

@Misekayek0l Are you using wicked on the Host? How is the bridge setup on the host? Why two on the virtual machine, both serve the same purpose?

I am using this exact image: https://download.opensuse.org/distribution/leap-micro/5.5/appliances/openSUSE-Leap-Micro.x86_64-Default-qcow.qcow2
with this combustion script:

#!/usr/bin/env sh

cp vconsole.conf /etc/vconsole.conf && chmod 644 /etc/vconsole.conf
rm /etc/localtime && ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
echo root:root | chpasswd

cp sshd_config /etc/ssh
mkdir -p /root/.ssh
echo <censored> >> /root/.ssh/authorized_keys

@Misekayek0l So you have to setup the host system for a bridge device, please show on the host ip a.

I think I found the problem:

<network connections="2">
  <name>net-oss-private</name>
  <uuid>eb196a1a-87ff-444d-a306-450f8d7d5a38</uuid>
  <forward mode="nat">
    <nat>
      <port start="1024" end="65535"/>
    </nat>
  </forward>
  <bridge name="virbr-oss" stp="on" delay="0"/>
  <mac address="52:54:00:d5:ad:3e"/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <host mac="52:54:00:d0:aa:9e" name="oss-vm" ip="192.168.122.134"/>
    </dhcp>
  </ip>
</network>

@Misekayek0l it could also be your combustion script…

I use;

#!/bin/bash

# combustion: network
exec > >(exec tee -a /dev/tty0) 2>&1

NODE_HOSTNAME="ahostname"


#### Use `openssl -6 password` to create the encrypted password for root and user.
##
ROOT_USER_PASSWORD='...'
SSH_ROOT_PUBLIC_KEY=system/ssh_key.pub

echo "Setting Local Timezone..."
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

install -m 0644 system/vconsole.conf /etc/vconsole.conf
install -m 0600 system/01-ssh.conf /etc/ssh/sshd_config.d/01-$NODE_HOSTNAME.conf

## Set root password
echo root:$ROOT_USER_PASSWORD | chpasswd -e
install -d -m 0700  /root/.ssh
cat $SSH_ROOT_PUBLIC_KEY >> /root/.ssh/authorized_keys

echo "openSUSE MicroOS configured with Combustion." > /etc/issue.d/01-combustion.conf

My secnod virt-network does no thave dhcp

@Misekayek0l On your host have you setup a bridge, for example, my workstation has the system NIC and then I have four NIC interfaces (PCIe X1 card) for virtual machines, comprising two bridges and two interfaces for allocation… Then anything created by an appliance gets deleted and I add as required to a VM.

I don’t think:

<network>
  <name>net-oss-private</name>
  <uuid>eb196a1a-87ff-444d-a306-450f8d7d5a38</uuid>
  <forward mode="nat">
    <nat>
      <port start="1024" end="65535"/>
    </nat>
  </forward>
  <bridge name="virbr-oss" stp="on" delay="0"/>
  <mac address="52:54:00:d5:ad:3e"/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.100" end="192.168.122.254"/>
      <host mac="52:54:00:d0:aa:9e" name="oss-vm" ip="192.168.122.134"/>
      <host mac="52:54:00:5e:50:3b" name="k8b0" ip="192.168.122.135"/>
    </dhcp>
  </ip>
</network>

still gives network error

admin@homelab:~/iso> ip a   
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d8:c4:97:f2:58:48 brd ff:ff:ff:ff:ff:ff
    altname enp2s0f1
    inet 192.168.0.2/24 brd 192.168.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 2002:c0a8:140:1:4386:6ddc:db75:1bf2/64 scope global temporary dynamic 
       valid_lft 296sec preferred_lft 296sec
    inet6 2002:c0a8:140:1:fb2e:ecfc:1c6e:1b5b/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 296sec preferred_lft 296sec
    inet6 fe80::f3b5:bd70:ae9:77f4/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bridge0 state UP group default qlen 1000
    link/ether 00:00:00:00:2b:49 brd ff:ff:ff:ff:ff:ff
    altname enp0s16u3
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 86:e2:18:bf:96:a6 brd ff:ff:ff:ff:ff:ff permaddr f8:a2:d6:ae:1c:79
    altname wlp3s0
5: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:00:00:2b:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.135/24 brd 192.168.0.255 scope global dynamic noprefixroute bridge0
       valid_lft 4589sec preferred_lft 4589sec
    inet6 2002:c0a8:140:1:5c3b:6fb7:6de8:37a5/64 scope global temporary dynamic 
       valid_lft 296sec preferred_lft 296sec
    inet6 2002:c0a8:140:1:d590:4d58:81fd:7d55/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 296sec preferred_lft 296sec
    inet6 fe80::274a:b255:809b:604a/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:d6:95:a9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr0
       valid_lft forever preferred_lft forever
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:95:d2:97 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe95:d297/64 scope link 
       valid_lft forever preferred_lft forever
8: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:87:60:51 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe87:6051/64 scope link 
       valid_lft forever preferred_lft forever
9: vnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:91:1d:bf brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe91:1dbf/64 scope link 
       valid_lft forever preferred_lft forever
10: vnet3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:04:db:a7 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe04:dba7/64 scope link 
       valid_lft forever preferred_lft forever
11: cni-podman0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether f6:db:44:fe:8a:c6 brd ff:ff:ff:ff:ff:ff
    inet 10.88.0.1/16 brd 10.88.255.255 scope global cni-podman0
       valid_lft forever preferred_lft forever
    inet6 fe80::f4db:44ff:fefe:8ac6/64 scope link 
       valid_lft forever preferred_lft forever
41: vnet28: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
    link/ether fe:54:00:50:ae:b2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe50:aeb2/64 scope link 
       valid_lft forever preferred_lft forever
42: vnet29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether fe:54:00:5f:de:13 brd ff:ff:ff:ff:ff:ff
49: virbr-oss: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:d5:ad:3e brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr-oss
       valid_lft forever preferred_lft forever
50: vnet34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master virbr-oss state UNKNOWN group default qlen 1000
    link/ether fe:54:00:5e:50:3b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe5e:503b/64 scope link 
       valid_lft forever preferred_lft forever

@Misekayek0l You need to disable any automatic ipv4/6 setup on the bridge device;

8: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 0e:24:64:bc:43:76 brd ff:ff:ff:ff:ff:ff

Thus I have to manually setup the IPs in all of my VM using the bridge?

@Misekayek0l No, the bridge is a bridge through the vm to your local lan, it gets an ip on the guest from your network dhcp. That’s why I’m confused for the need of any nat address required.

For example on my machines I have one device. I might add a second one for a private network at times.

<interface type="bridge">
  <mac address="52:54:00:79:d0:9d"/>
  <source bridge="br0"/>
  <model type="e1000"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</interface>

This is mine:

<interface type="bridge">
  <mac address="52:54:00:50:ae:b2"/>
  <source bridge="bridge0"/>
  <target dev="vnet28"/>
  <model type="virtio"/>
  <alias name="net0"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

@Misekayek0l that should work as long as you fix the host network.

Acutually think this is working, because before tested this in a alpine vm which only knew about the net-oss-private