-2

I have two hosts running opensuse 42.1 connected to a dlink router via eth0, accessible on 192.168.0.1 and using NetworkManager: - vboard/eth0 is assigned via router DHCP ip 192.168.0.199 - rihana/eth0 192.168.0.198

Using KVM on both hosts, I have two opensuse VMs ( vmvboard, vmrihana) one on each host.

I configured on both hosts a virbr0 network identically, in the range 192.168.100.0/24 and DHCP range 192.168.100.128-254 and NAT on any physical device.

Vm can ping its KVM host on both side, but VM's cannot talk to each other across router network. This config used to work on opensuse 13.2, but not using network manager...

What am I doing wrong?

Is there anyone to help me with that configuration: networking with 2 hosts, a router and 2 VM's, one on each host ?

Thanks a lot in advance for your ideas.

1 Answers1

0

Bridged Network for hosts and vms in a few clicks : using wicked.

  1. Set the Dlink router settings via Firefox/Chrome url: 192.168.0.1 User:Admin Pass: Blank IP on 192.168.0.1 subnet mask 255.255.255.224 ( 30 usable IPs) Enable DHCP: unchecked

Note: it might be easier to first reset router to standard setting and connect through Network Manager

  1. Setting up the Bridged Network with Libvirt/virt-manager and Wicked opensuse network service.

1.1 Clean host1 and host2 previous bridge definitions with YAST/NetworkManager/Network Settings/

Global Options Tab> Select in Dropdown: Wicked
> Overview Tab > Delete all Interfaces to make them appear as "not configured"
> HostName/DNS > Note that your hostname , domain remains there
> Routing Tab> Enable IPv4 Forwarding is off (no routing features for host1 and host2) Click Ok. This has now cleaned all interfaces/bridges and activated Wicked Network Service, instead of Network Manager:GNOME/Right Upper Corner has no Wired/Wifi Settings Menu Options. 1.2 Check the cleanup in Gnome Terminal as root: # su root Password:
# cd /etc/sysconfig/network

ls ifcfg
returns only
ifcfg-lo ifcfg.template

ls .ifcfg*
ls: cannot access .ifcfg*: No such file or directory

but in case there are still .ifcfg-br0 .ifcfg-eth0,

rm .ifcfg-br0 # rm .ifcfg-eth0

ifconfig
shows only lo interface:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 [...] Check if wicked is active:
# systemctl status wicked
wicked.service - wicked managed network interfaces
Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled) Active: active (exited) since Fri 2016-01-08 15:37:56 AZOT; 34min ago 2. Setting up the Bridge with LIBVIRT: Gnome Terminal command line:
# virt-manager or
GNOME YAST/Virtualization/Create Vm,followed by Cancel Creation 2.1 Click on your hypervisor QEMU/KVM to connect ( in my case QEMU/KVM ) 2.2 Menu Edit/Connections Details or Right-Click Details
2.3 Goto Network Interfaces Tab > Click + (Add) > Bridge > Forward : Name : br0
Start Mode: none
Activate Now: checked on
IP Settings: Leave DHCP
or Configure, Mode: Static ( to continue on previous example and because VMs IP are already statically defined) Address: 192.168.0.2/27 (equivalent to Subnet Mask set to 255.255.255.224) Gateway 192.168.0.1
Bridge Settings: turn STP off ( no complex networks )
Choose Interface(s)to Bridge eth0 is checked
2.4 Finish - This will take sometimes to set up. "The virtual interface is now being created." Processing... And br0 or brx shows as active. 2.5 Adjust your VMs Network NIC settings while they are still down 2.5.0 Remove Old NIC from VM:
Virt-Manager > Select VM > Open > Click Lamp Icon > Select NIC > Click Remove (right- down corner).
Note: if Lamp Icon does not appear after Open, Goto View and Select Toolbar checkbox. 2.5.1 Add new NIC to VM:
Virt-Manager > Select VM > Open > Click Lamp Icon > Add Hardware > Network > Network source: Bridge br0: host device eth0
MAC Address: checked, leave the suggested one
Device Model: Hypervisor Default or the one you know the vm-guest has the driver for.

Finish
2.5.2 Run the VM and test in VM's Gnome Terminal

ping vm
# ping host1 etc...

2.6 Repeat the steps in host2 bare metal, with Step 1 and subsequent 2.3 with Name : br0
Start Mode: none Activate Now: checked on
IP Settings: Leave DHCP
or Configure, Mode: Static
Address: 192.168.0.10/27
Bridge Settings: turn STP off
Choose Interface(s)to Bridge eth0 is checked 2.7 Adjust host2 VMs Network NIC settings according to 2.5

Conclusion: With a clean starting situation,
virt-manager could set up the bridge and network connection to the router successfully, in just a few clicks.