VM has no ethernet

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
It's been a while since I created a VM and I lost all knowledge.

I created a VM using Proxmox Backup Server ISO installer.
1706498434717.png


My VM has no access to LAN.. What did I forget ?
1706498513382.png
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
Please, surely someone must know why the host does not pass connectivity to the VM

I can provide logs... Simply tell me which are required.
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
Code:
root@truenas[~]# ifconfig -a
bce0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c00b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether 84:2b:2b:51:53:8a
        inet 10.0.0.6 netmask 0xffffff00 broadcast 10.0.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
bce1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=800b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,LINKSTATE>
        ether 84:2b:2b:51:53:8c
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pflog0: flags=0<> metric 0 mtu 33160
        groups: pflog
vlan10: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: IOT
        options=80000<LINKSTATE>
        ether 84:2b:2b:51:53:8c
        groups: vlan
        vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: bce1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
vlan40: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: Surveillance
        options=80000<LINKSTATE>
        ether 84:2b:2b:51:53:8c
        groups: vlan
        vlan: 40 vlanproto: 802.1q vlanpcp: 0 parent interface: bce1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge10: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:e5:2a
        inet 10.0.10.2 netmask 0xffffff00 broadcast 10.0.10.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vlan10 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 5 priority 128 path cost 55
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge40: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:ab:7c
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vlan40 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 6 priority 128 path cost 55
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:54:42
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vnet6 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 11 priority 128 path cost 2000000
        member: vnet0.1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 10 priority 128 path cost 2000
        member: bce0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
vnet0.1: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: associated with jail: seafile-jail as nic: epair0b
        options=8<VLAN_MTU>
        ether 86:2b:2b:23:46:0e
        hwaddr 02:81:fb:19:17:0a
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
vnet6: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether fe:a0:98:2b:af:ce
        hwaddr 58:9c:fc:10:08:26
        groups: tap
        media: Ethernet autoselect
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
        Opened by PID 25812
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
In the ifconfig , I can see bridge0

I dont see it in the GUI. Would not I be able to select bridge0 as "Nic to attach" when creating the VM
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
From your ifconfig output it looks like everything is connected correctly. How is the network configured inside the VM guest OS?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
In the ifconfig , I can see bridge0

I dont see it in the GUI. Would not I be able to select bridge0 as "Nic to attach" when creating the VM
That's another minor problem, but that can be addressed later. You should not rely on TrueNAS auto creating the bridge0 for you but instead configure it statically and - most important - remove the IP address from bce0 and put it on the bridge interface instead. But let's get this VM online, first.

An educated guess: you installed from an ISO, so you had a virtual CD-ROM device, correct? And you removed that device completely after you were done? Frequently at least for the Ubuntu releases that I installed that means than inside the guest OS the network interface is renamed from enp0s5 to enp0s4. So the guest does not bring it up anymore because it tries to configure enp0s5 which isn't there.

Search for how you can examine and possibly change the network configuration for Proxmox on the console.
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
From your ifconfig output it looks like everything is connected correctly. How is the network configured inside the VM guest OS?
The ifconfig is is the first original post

Here is another output
1706617165474.png
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
That's another minor problem, but that can be addressed later. You should not rely on TrueNAS auto creating the bridge0 for you but instead configure it statically and - most important - remove the IP address from bce0 and put it on the bridge interface instead. But let's get this VM online, first.

An educated guess: you installed from an ISO, so you had a virtual CD-ROM device, correct? And you removed that device completely after you were done? Frequently at least for the Ubuntu releases that I installed that means than inside the guest OS the network interface is renamed from enp0s5 to enp0s4. So the guest does not bring it up anymore because it tries to configure enp0s5 which isn't there.

Search for how you can examine and possibly change the network configuration for Proxmox on the console.
I think you nailed it.... Trying to edit /etc/network/interfaces
1706617271136.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yeah - the configuration file references enp0s5, but from your ifconfig output you can see that the interface is enp0s4. You need to edit the configuration file from the console, change "5" to "4", save and reboot. As I guessed ...
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
1706617384466.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So now 10.0.0.17 is reachable? Should be ...
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
That's another minor problem, but that can be addressed later. You should not rely on TrueNAS auto creating the bridge0 for you but instead configure it statically and - most important - remove the IP address from bce0 and put it on the bridge interface instead. But let's get this VM online, first.

[...]
Thanks!!!

I'd like to solve this as well

[edit]
Won't I be losing access to the GUI while doing so, locking me out ^

I am leaving for work but will come back at it tonight
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
1. Shut down your VM and your jail.
2. Set "autostart" to off for both.
3. Reboot your system - this is necessary to remove the auto created bridge0 interface.
4. Create a bridge interface, name it bridge0, assign bce0 as a member interface, test & save.
5. Remove the IP address from bce0, tick the box "disable hardware offloading", put "up" in the "Options" field.
6. Place the IP address on the bridge0 interface.
7. Test & save - possibly increase the test timeout from 60 seconds to 300 or so, might take a while until you can reach your NAS again after clicking "Test".
8. When that works in your VM assign bridge0 to the virtual ethernet device.
9. In your jail set "vnet_default_interfaces" to "none", and down in the network properties section "interfaces" to "vnet0:bridge0"
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
1. Shut down your VM and your jail.
2. Set "autostart" to off for both.
3. Reboot your system - this is necessary to remove the auto created bridge0 interface.
4. Create a bridge interface, name it bridge0, assign bce0 as a member interface, test & save.
5. Remove the IP address from bce0, tick the box "disable hardware offloading", put "up" in the "Options" field.
6. Place the IP address on the bridge0 interface.
7. Test & save - possibly increase the test timeout from 60 seconds to 300 or so, might take a while until you can reach your NAS again after clicking "Test".
8. When that works in your VM assign bridge0 to the virtual ethernet device.
9. In your jail set "vnet_default_interfaces" to "none", and down in the network properties section "interfaces" to "vnet0:bridge0"
I realized that since my other VMs and jails are connected to bce1, I would rather put PBS in bce1.

I tried creating a "bridge1" to "bce1" but TN said "bce1" was busy with "vlan40" so I remenbered (I guess) that once a NIC is bridged to vlans, they all must be VLANs. Si I created vlan1, which is fact does not exist. I thought I could put this VM on native LAN (on which is bce0)

This is what I have done but I can't reach the PBS GUI so I guess there is something I did not get right (again) in L2 management.

1706664576592.png

Code:
root@truenas[~]# ifconfig -a
bce0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c00b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether 84:2b:2b:51:53:8a
        inet 10.0.0.6 netmask 0xffffff00 broadcast 10.0.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
bce1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=800b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,LINKSTATE>
        ether 84:2b:2b:51:53:8c
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pflog0: flags=0<> metric 0 mtu 33160
        groups: pflog
vlan10: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: IOT
        options=80000<LINKSTATE>
        ether 84:2b:2b:51:53:8c
        groups: vlan
        vlan: 10 vlanproto: 802.1q vlanpcp: 0 parent interface: bce1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
vlan40: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: Surveillance
        options=80000<LINKSTATE>
        ether 84:2b:2b:51:53:8c
        groups: vlan
        vlan: 40 vlanproto: 802.1q vlanpcp: 0 parent interface: bce1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge10: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:e5:2a
        inet 10.0.10.2 netmask 0xffffff00 broadcast 10.0.10.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vlan10 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 5 priority 128 path cost 55
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge40: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:ab:7c
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vlan40 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 6 priority 128 path cost 55
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:54:42
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vnet0.1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 10 priority 128 path cost 2000
        member: bce0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
vnet0.1: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: associated with jail: seafile-jail as nic: epair0b
        options=8<VLAN_MTU>
        ether 86:2b:2b:23:46:0e
        hwaddr 02:81:fb:19:17:0a
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 84:2b:2b:51:53:8c
        groups: vlan
        vlan: 1 vlanproto: 802.1q vlanpcp: 0 parent interface: bce1
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
bridge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:9f:36
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: vnet0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 13 priority 128 path cost 2000000
        member: vlan1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 11 priority 128 path cost 20000
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
vnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether fe:a0:98:2b:62:31
        hwaddr 58:9c:fc:10:08:26
        groups: tap
        media: Ethernet autoselect
        status: active
        nd6 options=9<PERFORMNUD,IFDISABLED>
        Opened by PID 3164

1706664640870.png
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
@Patrick M. Hausen
I connected the VM to "bce1" and it's working but since you suggested in post #6 that I create a static bridge0, I tough I'd do the same for "bce1".... But...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Depends. If you need an IP address for your NAS host in that network, then you must statically create the bridge and assign the IP address to the bridge interface. A bridge member interface must not have an IP address.

Static bridges also eliminate the danger of the "bridge creation magic" guessing wrong and creating a loop, specifically with complex topologies with VLANs like yours.
 

NinthWave

Contributor
Joined
Jan 9, 2021
Messages
129
Depends. If you need an IP address for your NAS host in that network, then you must statically create the bridge and assign the IP address to the bridge interface. A bridge member interface must not have an IP address.
If I understood correctly when you helped me for a similar problem in 2022:
The PBS is a VM on TN-core host and the GUI of PBS is accessible through "bce1"
The data that will be back-up will be exchanged trough "bce0" of TN-core host

If I want PBS to communicate with TN-core NFS share without the need of pfSense firewall (talk directly), then the bridge require an IP address?


1706721692775.png



But TN refuses I add an IP=10.0.0.5 at bridge1
1706721902709.png



TN refuses I create bridge1 with bce1 as a member
1706721827649.png


So I am confused... again
 

Attachments

  • 1706721888384.png
    1706721888384.png
    32.6 KB · Views: 97
  • 1706721910324.png
    1706721910324.png
    32.6 KB · Views: 97
Top