Is there a way to get Debian 7 vm network work under Incus 6.6?

Hello!

I have a problem with Debian 7.11 VM NIC under Incus 6.6. It only shows “lo” interface.

From Incus side, it is using “eth0” interface:
eth0:
nictype: bridged
parent: vlan50
type: nic

(VLAN is working, as some others instances are using it).

incus info old_deb

is showing that interface is up, but packages are not sent or received.

From VM side

**ip link show** 

shows only “lo” interface

**/etc/network/interface** 

includes simple configuration to just bring “eth0” up and configure ip address, network and gateway

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address

**lspci | grep -i eth**

05:00.0 Ethernet controller: Red Hat, Inc Device 1041 (rev 01)

**lshw -C network**

*-network UNCLAIMED
description: Ethernet controller
product: Red Hat, Inc
vendor: Red Hatm Inc
physical id: 0
bus info: pci@0000:05:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: msix pm pciexpress cap_list
configuration: latency=0
resources: iomemory:38400-383ff memory:fe0400000-fe040fff …

As it is “UNCLAIMED” it seems to be a driver issue.

When I was looking loaded “virtio” modules (lsmod | grep virtio), I saw that “virtio_net” was not loaded. So I tried to load it manually (modprobe virtio_net) and also added it to “/etc/modules”. Although the module was now loaded automatically, it did not solve the problem and network controller was still in “UNCLAIMED” status.

I upgraded linux kernel to 3.16, which should be last supported kernel for Debian 7.11 but that did not solve the problem. So I am kind of stuck here.

I know that with some other hypervisors it is sometimes necessary to change network driver (rtl / intel). I am not sure, it is the case with Incus.

It is very old Debian, but Is there a way to get Debian 7.11 vm network work under Incus 6.6?

As additional info:

  1. I only see “virtio-pci” directory under “/sys/bus/pci/drivers/” so dynamically “virtio-net” drivers are not loaded.
  2. cat /boot/config-3.16.0.0.bpo.4-amd64 | grep -i virtio” displays:

CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_SCSI_VIRTIO=m
CONFIG_VIRTIO_NET=m
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_BALLOON=m

  1. lsmod | grep -i virtio” displays modules:
    virtio_net
    virtio_scsi
    scsi_mod
    virtio_pci
    virtio_ring
    virtio

  2. lspci -nnk | grep -i eth” displays two devices:

05:00.0 Ethernet controller [0200]: Red Hat, Inc Device [1af4:1041] (rev 01)
Subsystem: Red Hat, Inc Device [1af4:1100]
06:00.0 Ethernet controller [0200]: Red Hat, Inc Device [1af4:1041] (rev 01)
Subsystem: Red Hat, Inc Device [1af4:1100]

(those two should be added “eth0” and “eth1” cards).

  1. “/etc/network/interfaces” is configured like this at the moment:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

  1. service networking restart” gives errors:

Cannot find device “eth0”
Cannot find device “eth1”

  1. “ifup eth0” command gives error:

Cannot find device “eth0”
Bind socket to interface: No such device
Failed to bring up eth0

  1. incus info <vm-name>” display that “eth0” and “eth1” states are up for this vm.

  2. both interfaces are “bridged” type from profile side:

eth0:
nictype: bridged
parent: vlan50
type: nic
eth1:
name: eth1
nictype: bridged
parent: vlan50
type: nic

Any ideas?
Should Debian 7.x vm network work with Incus 6.6 or it will not work and I should use another hypervisor for older Linux machines (ProxMox VE, XCP-ng,…)?

Regards,
Raul

FYI, I also faced difficulties to run a legacy (but mandatory) Debian 8 inside an Incus VM.

The simple trick I finally used was to install a more recent kernel from Debian backports! Linux 4.9 was enough to let the VM run (standard Debian 8 has Linux 3.16).

Also, if you move from one virtual hardware to a different one (it was my case, moving out from vSphere), remember to set MODULES=most in initramfs config (and run update-initramfs), so that it will embed all required virtio modules used with Incus.

An alternative option would be to change the network driver to E1000 in the qemu config but that requires properly a newer Incus version on the host. Take a look at Incus VM with e1000e Network Driver usually all older virtualisation systems used this ethernet driver on default before virtio got popular.