KVM network configuration

johno

New Member
Mar 20, 2009
6
0
1
Bristol, UK
www.sangoma.co.uk
I am trying to configure networking on a KVM VM, but am unable to see anything outside the VM. On the host I have a number of machines using OpenVZ and I have configured their IP addresses through the Proxmox console.

The host ifconfig gives:
dummy0 Link encap:Ethernet HWaddr B2:57:56:B3:ED:5E
inet6 addr: fe80::b057:56ff:feb3:ed5e/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:20147 (19.6 KiB)

eth0 Link encap:Ethernet HWaddr 00:22:15:41:47:A6
inet addr:xx.xx.xx.xx Bcast:xx.xx.xx.xy Mask:255.255.255.0
inet6 addr: fe80::222:15ff:fe41:47a6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6495146 errors:0 dropped:0 overruns:0 frame:0
TX packets:3915759 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6268099270 (5.8 GiB) TX bytes:566776211 (540.5 MiB)
Interrupt:252 Base address:0x6000

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:16436 Metric:1
RX packets:503578 errors:0 dropped:0 overruns:0 frame:0
TX packets:503578 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:197793497 (188.6 MiB) TX bytes:197793497 (188.6 MiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:448337 errors:0 dropped:0 overruns:0 frame:0
TX packets:835670 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:50626882 (48.2 MiB) TX bytes:1172387282 (1.0 GiB)

vmbr0 Link encap:Ethernet HWaddr B2:57:56:B3:ED:5E
inet addr:xx.xx.xx.xx Bcast:xx.xx.xx.xy Mask:255.255.255.0
inet6 addr: fe80::b057:56ff:feb3:ed5e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10214 errors:0 dropped:0 overruns:0 frame:0
TX packets:1828 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:576221 (562.7 KiB) TX bytes:76992 (75.1 KiB)

vmtab104i Link encap:Ethernet HWaddr 00:FF:A6:0A:94:EC
inet6 addr: fe80::2ff:a6ff:fe0a:94ec/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:7245 errors:0 dropped:0 overruns:0 frame:0
TX packets:1286 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:502806 (491.0 KiB) TX bytes:55308 (54.0 KiB)

vmtab107i Link encap:Ethernet HWaddr 00:FF:C0:1B:78:CB
inet6 addr: fe80::2ff:c0ff:fe1b:78cb/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1368 (1.3 KiB) TX bytes:510 (510.0 b)

xx.xx.xx.xx is the public IP address. I am trying to create a VM with 10.10.10.104 and another on 10.10.10.107.

brctl show gives:
bridge name bridge id STP enabled interfaces
vmbr0 8000.b25756b3ed5e no dummy0
vmtab104i0
vmtab107i0

When I run through the Ubuntu installation on the VM through the VNC console, when it comes to configuring the network, it cannot see any gateway address I add. (I've tried the xx.xx.xx.xy address and 0.0.0.0).

I'm not sure I have provided all the relevant information, but can you help?
 
I am trying to configure networking on a KVM VM, but am unable to see anything outside the VM.

You need to configure the network inside the VM (for KVM VMs). They behave exactly like a physical machine on your network.

- Dietmar
 
You have a dummy0 network device - I do not know if that works at all. Why dont you use the default setup?
 
dummy0 is the name of the bridge.

Here is my interfaces file:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 94.23.49.222
netmask 255.255.255.0
network 94.23.49.0
broadcast 94.23.49.255
gateway 94.23.49.254
auto vmbr0
iface vmbr0 inet static
address 94.23.49.222
netmask 255.255.255.0
post-up /etc/pve/kvm-networking.sh
bridge_ports dummy0
bridge_stp off
bridge_fd 0
 
This is the default setting, as far as I am aware. I have downloaded an Ubuntu ISO and am creating the VM from that. (I am actually trying to get digium-switchvox-free working but the GUI does not allow me to get to a shell to inspect the config, so I thought I would try Ubuntu). When asked for the network settings it asks for a gateway and reports that it is not found whenever I put the xx.xx.xx.xy address in). If I leave it blank I can complete the installation, but networking is not available.

I am not purposely differing from the default.
 
I have been trawling the postings and someone has mentioned "a customised configuration like that from OVH". This server is hosted by OVH, so I suppose that means it may not be default.

My problem now is that I don't know what default is.
 
I have been trawling the postings and someone has mentioned "a customised configuration like that from OVH". This server is hosted by OVH, so I suppose that means it may not be default.

My problem now is that I don't know what default is.

if you got the custom setup from OVH you need to ask OVH support for help.
 
Last edited:

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!