“One of these Days When I Get Time” I am planning on creating what I hope to be a comprehensive re-working of available documentation about virtual networking but of course am finding no time to actually do it.
So, here is a brief preview of what I will likely publish later.
(am skipping description of what a network bridge actually is, it’s a virtual device that’s <not> the same as a real, physical network bridge device. Although the names are the same, they are completely different so discussion context is important).
Conventional documentation generally repeats what was written years ago, describing creating a networking bridge using YAST and/or using ifup/ifdown. The current otherwise excellent SUSE and QEMU documentation describes this “classic” ifup/ifdown method and all documentation is based on eth0. Bridges can be built on any physical network interface including wlan0.
The classic bridge documentation also only describes creating basic transparent bridge device, but the device can also be configured to provide some Network Services like DHCP. Although it’s likely possible to configure this more complex device manually, it’s very easy to setup using the libvirt “vm manager.”
Note that once a network bridge device is created, it can be used by any virtualization technology, so for example a bridge (supporting a virtual network) created in vm manager can also be used by LXC (is automatically picked up in the YAST LXC applet), VirtualBox, etc. I’m in the processes of looking at VirtualBox/libvirt integration through the use of Vagrant.
So now that some of that preliminary stuff is out of the way, your specific situation likely can be addressed by
- Configure your virtual networks <before> a Guest is created. If you already have Guests created, there shouldn’t be a problem, see below
Open vm managerr
Edit > connection details
Click on “virtual networks” tab
1a. The Default network should already be configured to support NAT, if it’s not started, then start by highlighting then clicking on the arrow button
1b. You can also create new virtual networks, for example if you want to deploy a new network with an address space that won’t conflict with the physical network (critical when doing NAT). Or, create a new Host Only network. Or, create a transparent bridging network (same IP addresses as physical network).
After 1a or 1b, <note> the Device ID, all libvirt-created bridge devices typically start with “virbr” --This is what you will use to configure virtual NICs
Note that after your libvirt-created bridges are created you can also manage them using the main utility brctl (eg brctl show)
- After you’ve created your bridge device supporting your specified virtual network, the device should now be available as a dropdown selection in the VM creation utility of your choice. If you’re not selecting default, don’t forget to make the change manually!
2a. For existing Guests, you can switch between available virtual networks by configuring the NIC to bind to a specific virtual bridge device (eg virbr0). You configure this by selecting your VM in vm manager, selecting “Open” and clicking on the blue “!” button (I guess for information). Select the NIC (or remove/add) and select the proper virtual bridge device of choice.
OK, so you’ve configured your virtual network, virtual bridge device and the Guest NIC and you think things should work, right?
Not so fast, maybe or maybe not!
You may need to enable IP forwarding in the following places
SUSE FW (place in appropriate zone, likely either DMZ or Internal)
And, with a touch of luck, <now> things should be working…