VM Networking

sirmikealot

New Member
Jan 6, 2011
17
0
1
Gang,... I'm using Proxmox 1.9 with Kernel 2.6.32.

The VM Server is running fine and can update/upgrade just fine.
I went to update/upgrade some VM's and none of them can reach the public internet.
(They do work privately though).

Here's my two configs ( one is the sever, the other a VM ).
Btw, .254 is my gateway/router to the outside world.
Any ideas why my VM's can't see the public side of the internet ???

Thanks!

michael


[VM Server]
/etc/network/interfaces

auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.254
bridge_ports eth0
bridge_stp off
bridge_fd 0



[Virtual Machine]
/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.161
netmask 255.255.255.0
gateway 192.168.1.254
 
Hi,
do you use some iptable stuff on the host?
Can you post a vm-config?
What do you see with tcpdump on the host?

Udo

VM Server ( default installation )

InterfaceActivePorts/Slaves
AutostartIP AddressSubnet MaskGateway
tarrdown.png
eth1no
tarrdown.png
vmbr0yeseth0192.168.1.123255.255.255.0192.168.1.254

Nothing really fancy here, just default install.

How would you configure the vm server/machines ??? I didn't really want to get into a complicated configuration.

Do you think I'll have to shift to masquarading or routing configs ???
 
vm:/etc/qemu-server# nano 161.conf

ostype: l26
memory: 2048
sockets: 2
name: web-base-J174
ide2: none,media=cdrom
bootdisk: scsi0
scsi0: local:161/vm-161-disk-1.raw
onboot: 0
cores: 4
vlan0: e1000=82:73:8A:38:E4:73


( no conf file for that container in cat /etc/vz/conf/VMID.conf" )
 
vm:/etc/qemu-server# nano 161.conf

ostype: l26
memory: 2048
sockets: 2
name: web-base-J174
ide2: none,media=cdrom
bootdisk: scsi0
scsi0: local:161/vm-161-disk-1.raw
onboot: 0
cores: 4
vlan0: e1000=82:73:8A:38:E4:73


( no conf file for that container in cat /etc/vz/conf/VMID.conf" )
Hi,
on a kvm-VM you have the config in /etc/qemu-server, an OpenVZ-VM store the config in /etc/vz/conf (it was not clear for me if you speak from kvm or openvz).

I see no issues in your config - the VM should be able to reach the internet like the host. Perhaps there are some arp-blocking stuff on the router/switch (only one MAC-adress allowed?)?

I assume that traceroute from the VM to an outside address go directly to the router?!

Gives tcpdump an hint?

One thing about your config: scsi is not well supportet, virtio is for linux the better choice (you can normaly edit your config-file, stop vm and start again - with modern linux-installations they run out of the box with virtio).

Udo
 
Hi,
on a kvm-VM you have the config in /etc/qemu-server, an OpenVZ-VM store the config in /etc/vz/conf (it was not clear for me if you speak from kvm or openvz).

I see no issues in your config - the VM should be able to reach the internet like the host. Perhaps there are some arp-blocking stuff on the router/switch (only one MAC-adress allowed?)?

I assume that traceroute from the VM to an outside address go directly to the router?!

Gives tcpdump an hint?

One thing about your config: scsi is not well supportet, virtio is for linux the better choice (you can normaly edit your config-file, stop vm and start again - with modern linux-installations they run out of the box with virtio).

Udo


FOUND IT. Apparently my /etc/resolv.conf was not keyed in correctly.

tinkered with it a bit,... then did a /etc/init.d/networking restart and 'voila. It's all working fine now. Thanks for the head's up on the scsi vs. virtio. I think there was an issue in the past where virtio did not work correctly as well. I'm happy to try the virtio again, so i will let you know if it still has issues.
 

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!