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 )

[TABLE="class: normal"]
[TR]
[TH="colspan: 1"][/TH]
[TH="colspan: 1"]Interface[/TH]
[TH="colspan: 1"]Active[/TH]
[TH="colspan: 1"]Ports/Slaves
[/TH]
[TH="colspan: 1"]Autostart[/TH]
[TH="colspan: 1"]IP Address[/TH]
[TH="colspan: 1"]Subnet Mask[/TH]
[TH="colspan: 1"]Gateway[/TH]
[/TR]
[TR="class: link, bgcolor: #EDEDED"]
[TD]
tarrdown.png
[/TD]
[TD]eth1[/TD]
[TD]no[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR="class: link, bgcolor: #FFFFFF"]
[TD]
tarrdown.png
[/TD]
[TD]vmbr0[/TD]
[TD]yes[/TD]
[TD]eth0[/TD]
[TD][/TD]
[TD]192.168.1.123[/TD]
[TD]255.255.255.0[/TD]
[TD]192.168.1.254[/TD]
[/TR]
[/TABLE]

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.