VM no Internet

eiger3970

Well-Known Member
Sep 9, 2012
276
3
58
Hello, I upgraded to Proxmox Virtual Environment 4.2-2/725d76f0 and restored the VMs, but 1 VM (Ubuntu) will not access Internet? I set /etc/network/interfaces with the same config as the other VMs, but no Internet for some reason?
Setting is:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.143
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
dns-nameservers 8.8.4.4


Any suggestions on the Proxmox config at all?
I might remove and create a new VM and restore the VM to fix it, but I would like to know what configuration is awry.

Yes, for any troll helpers, I read proxmox https://pve.proxmox.com/wiki/Network_Model
 
could you post the config of the specific vm with
Code:
qm config VMID
 
Thank you.

VM 141's network shows: (141 DHCP and static IP has Internet)
Code:
net0: e1000=02:4A:8D:18:39:63,bridge=vmbr0


VM 143's network shows: (DHCP has Internet, but static IP (preferred) has no Internet)
Code:
net0: bridge=vmbr0,e1000=36:64:33:61:65:63


I'm not sure why the order of the network bridge and e1000 (not sure what e1000 is) is different, so I'll research.
Any help on this would be great and maybe quicker than my research.


VM 141
Code:
root@proxmox:~# qm config 141
bootdisk: virtio0
cores: 1
ide2: local:iso/ubuntu-16.04-server-amd64.iso,media=cdrom
memory: 2048
name: vm141
net0: e1000=02:4A:8D:18:39:63,bridge=vmbr0
onboot: 1
ostype: other
smbios1: uuid=bcd7c21c-69ce-4ae0-a7c2-95eed0ab2d2c
sockets: 1
virtio0: local:141/vm-141-disk-1.raw,size=100G


VM 143
Code:
root@proxmox:~# qm config 143
bootdisk: virtio0
cores: 1
ide2: local:iso/ubuntu-16.04-server-amd64.iso,media=cdrom
memory: 2048
name: vm143
net0: bridge=vmbr0,e1000=36:64:33:61:65:63
numa: 0
onboot: 1
ostype: l26
smbios1: uuid=9f0e0b40-b537-49a1-9611-f25f1f20f253
sockets: 1
virtio0: local-lvm:vm-143-disk-1,size=30G
 
Last edited:
e1000 is your network driver. Try to change it to virtio (also gives better performence in most setups). The order is just a syntax issue and both are valid, if you want you can change it in /etc/pve/qemu-server/VMID.conf.

On the VM without internet connection, can you ping the gateway IP?
 
Thank you for the reply.

From VM 143, pinging the gateway shows error:
connect: Network is unreachable.

However, the network seems messed up:

This is the current config for /etc/network/interfaces:
Code:
source /etc/network/interfaces.d/*

auto lo

iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.143
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
dns-nameservers 8.8.4.4


ifconfig shows:
Code:
lo  Link encap:Local Loopback
    inet addr:127.0.0.1  Mask:255.0.0.0
    inet6 addr:  ::1/128  Scope:Host
    UP LOOPBACK RUNNING  MTU:65536  Metric:1
    RX packets:160 errors:0  dropped:0  overruns:0  frame:0
    TX packets:160 errors:0  dropped:0  overruns:0  carrier:0
    collisions:0  txqueuelen:1
    RX bytes:11840  (11.8 KB)  TX bytes:11840 (11.8 KB)


I changed /etc/pve/qemu-server/143.conf, line 4, from
Code:
ide2: local:iso/ubuntu-16.04-server-amd64.iso,media=cdrom
memory: 2048
name: 143
net0: bridge=vmbr0,e1000=36:64:33:61:65:63
numa: 0
onboot: 1
ostype: l26
smbios1: uuid=9f0e0b40-b537-49a1-9611-f25f1f20f253
sockets: 1
virtio0: local-lvm:vm-143-disk-1,size=30G

to

Code:
ide2: local:iso/ubuntu-16.04-server-amd64.iso,media=cdrom
memory: 2048
name: 143
net0: bridge=vmbr0,virtio=36:64:33:61:65:63
numa: 0
onboot: 1
ostype: l26
smbios1: uuid=9f0e0b40-b537-49a1-9611-f25f1f20f253
sockets: 1
virtio0: local-lvm:vm-143-disk-1,size=30G

Rebooted VM 143, but same error.
 
Last edited:
To change from e1000 to virtio you need to stop-start the VM, a reboot is not enough.

Do you get any error when you run "service networking restart" and/or "ifconfig eth0 up" in the VM?
 
Last edited:
Ok, I stopped and started the VM, but same error.
Code:
Service networking restart

Job for networking.service failed because the control process exited with error code. See “systemctl status networking.service” and “journalctl -xe” for details.

Code:
Ifconfig eth0 up

Eth0: ERROR while getting interface flags: No such device
 
Okay so there's no eth0 device. I guess your system has another/new interface name (possibly eth1?) for your networkcard. Run:

# ls /sys/class/net

Then you should see something like:

eth0 eth1 lo

Change in /etc/network/interfaces to right interface name and reboot VM. If you only see 'lo' this isn't the case and there's another problem.
 
Thank you for the reply.
The Console shows the 2nd option, outputting lo.

Here's the output for the error prompts:
systemctl status networking.service
Code:
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
              |_50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Sat 2016-05-28 17:50:44 AEST; 3h 24min ago
 Docs: man:interfaces(5)
Process: 706 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 698 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exlude
Main PID: 706 (code=exited, status=1/FAILURE)

May 28 17:50:44 ubuntu systemd[1]: Starting Raise network interfaces...
May 28 17:50:44 ubuntu ifup[706]: Cannot find device "eth0"
May 28 17:50:44 ubuntu ifup[706]: Failed to bring up eth0.
May 28 17:50:44 ubuntu systemd[1] networking.service: Main process exited, code=exited, status=1/FAILURE
May 28 17:50:44 ubuntu systemd[1]: Failed to start Raise network interfaces.
May 28 17:50:44 ubuntu systemd[1]: networking.service: Unit entered failed state.
May 28 17:50:44 ubuntu systemd[1]: networking.service: Failed with result 'exit-code'.
lines 1-17/17 (END)
 
Last edited:
Strange. Try this command also:

# lspci | grep -i eth

What's the output? You should see something like:

Code:
00:12.0 Ethernet controller: Red Hat, Inc Virtio net
work device

If so just try "ifconfig eth1 up", "ifconfig eth2 up" etc. The one that don't gives an error is your device you need to replace eth0 with in /etc/network/interfaces and reboot.

If you still don't see a networkdevice, stop VM, remove all networkadaptors. in PVE, boot VM, stop VM, add networkadaptor, boot VM again and test again if you see any interfaces now.

If still not: do you use a custom kernel?
 
VM 143 had no network device.

I stopped VM, added network device, started VM.

VM 141 has network device, but same error.

$ lspci | grep -i eth
00:12.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)

$ ifconfig eth 0 up
SIOCSIFADDR: No such device
eth: ERROR while getting interface flags: No such device

$ ifconfig eth 1 up
eth1: ERROR while getting interface flags: No such device
 
Still very strange. I currently have no more ideas for you for a fix. Maybe some other user or someone from Proxmox staff have a clue?
 
k, thanks.

By the way, I just found how to add the network with Network Device Model VirtIO (paravirtualised), rather than Intel E1000.

Hasn't resolved the issue though.
 
Last edited:
The other 2 VMs connect okay to the network.
The difference they're running RedHat Centos, so maybe Debian is no longer compatible with Proxmox?
 
That's definitely not the issue. In fact, PVE is a Debian based system. I think about 90% of all our VM's running on PVE are Debian (Wheezy and Jessie).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!