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 show
inside the VM only displayedlo
(loopback), with noeth0
orensX
. - 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 ethernet
Output confirmed that the Virtio network adapter was present (
Red Hat, Inc. Virtio network device
). -
Manually load the Virtio network module:
sudo modprobe virtio_net
However, this did not make the interface appear.
-
Force a PCI bus rescan:
echo 1 > /sys/bus/pci/rescan
This also did not help, confirming the issue was deeper.
- Running
brctl show vmbr0
on Proxmox did not list the VM's interface.
- The VM's network interface (
net0
) was assigned tovmbr0
in 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.
-
ens18
was 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/interfaces
Added:
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/interfaces
Add:
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.4
Then 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! 🚀