Debugging Proxmox Debian VM Network Issues - myomaniac/myomaniaclab GitHub Wiki
This document provides a step-by-step log of the issues encountered while setting up networking for a Debian VM on Proxmox, why they happened, and how they were resolved.
- Running
ip link showinside the VM only displayedlo(loopback), with noeth0orensX. - The VM was unable to reach the Proxmox host or external networks.
- The Virtio network adapter was present in Proxmox but was not being detected by Debian.
- The necessary driver (
virtio_net) was not initializing the network interface correctly.
-
Verify that the Virtio network device was present:
lspci | grep -i ethernetOutput confirmed that the Virtio network adapter was present (
Red Hat, Inc. Virtio network device). -
Manually load the Virtio network module:
sudo modprobe virtio_netHowever, this did not make the interface appear.
-
Force a PCI bus rescan:
echo 1 > /sys/bus/pci/rescanThis also did not help, confirming the issue was deeper.
- Running
brctl show vmbr0on Proxmox did not list the VM's interface.
- The VM's network interface (
net0) was assigned tovmbr0in Proxmox but was not properly attached.
-
Remove and re-add the network interface in Proxmox:
qm set 102 -delete net0 qm set 102 -net0 virtio,bridge=vmbr0 -
Restart the VM:
qm stop 102 qm start 102 -
Confirm the VM’s network interface appeared inside Debian:
ip link show✅ Success! The interface (
ens18) appeared.
-
ens18was now detected, but it had no IP address. - The VM could not communicate with the Proxmox host or the internet.
- DHCP did not automatically assign an IP to the interface.
-
Manually request an IP via DHCP:
sudo dhclient ens18✅ Success! The VM was assigned an IP (
10.0.0.95). -
To make the configuration persistent, we updated
/etc/network/interfaces:nano /etc/network/interfacesAdded:
auto ens18 iface ens18 inet dhcp -
Restart networking service:
systemctl restart networking
To ensure the network remains functional after reboot:
-
Ensure the Virtio network module loads at boot:
echo "virtio_net" >> /etc/modules -
(Optional) Set a Static IP:
nano /etc/network/interfacesAdd:
auto ens18 iface ens18 inet static address 10.0.0.162 netmask 255.255.255.0 gateway 10.0.0.1 dns-nameservers 8.8.8.8 8.8.4.4Then apply changes:
systemctl restart networking
| Issue | Cause | Solution |
|---|---|---|
| Debian VM had no network | Virtio network adapter not initializing | Loaded virtio_net module, forced PCI rescan |
| VM not attached to vmbr0 | Proxmox misconfiguration | Removed and re-added net0 in Proxmox |
| No IP assigned | DHCP did not request an IP | Manually ran dhclient ens18 |
✅ Final Status: VM networking is fully functional and persistent after reboot! 🚀