Need help creating the bridge

I have installed Xen virtualizer in openSuSE 12.3. Initially when i first created a virtual machine it setup the bridge automatically ant it worked fine. However all this is happening at work and on this machine, I had to setup a proxy and a static ip. When i tried to do that, i also removed the bridge created by Xen (my fault as I couldn’t get it to work with the bridge there). Now, I tried re-creating the bridge from the VMManager, however it is asking me to select the interfaces I would like to bridge. When I checked the box for the eth0, and created the bridge, the entire internet connection went down. Also, I cannot have the bridge modify the mac, as apparently, when I created it then it changed the MAC, or tried to unify them I guess, and the switch disabled the port with error-disabled.
I need to add a bridge that will act like a nat(inisde the VM there will be a network with 192.168.0.0 that will communicate with eth0 for internet access using the NAT as gateway). Does anyone know how to do this without screwing up the connection on the main machine?

Kind Regards

OK,
“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

  1. 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)

  1. 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
IP Tables
/etc/sysctl.conf
/proc/sys/net/bridge (https://forums.opensuse.org/english/get-technical-help-here/network-internet/486691-bridge-nf-any-good-references.html)

FW ports
SUSE FW (place in appropriate zone, likely either DMZ or Internal)

And, with a touch of luck, <now> things should be working…

HTH,
TSU

Ok, so after reading your instructions, I went ahead and simply added a new virtual network. I could not start the old machine any more as it was asking for a bridge in yast>network interfaces, a bridge br0, which was not created even with the new virtual network.

However, when i tried manually creating a bridge now, it did display the virtbr0 so I clicked cancel and i am now installing Winserver 2008. From what I was able to see, it automatically assigned virtbr0 as network and it said fully virtualized lan adapter RTL… which is the actual network adapter installed. I guss it should be working now. I did create a virtual network to be a NAT and with internal network 192.168.0.0. I am waiting for the OS to install and see if I have network access. Thank you very much for your help.:slight_smile: I was previously trying to create a manual bridge, under the network interfaces tab. I do hope this will work now.

Network access appeared to work. However, If i try to mount a disk in the virtual machine, as in going to Info and disconnecting the drive, and then re-connecting doesn’t work. When I click on connect, it asks for an image and when I try to browse for it, it disconnects the VM Manager all together. I can’t seem to be able to connect an .iso to it in any way.

Is there a workaround for this?

At the moment I rebooted to standard kernel and started virtualbox, and while this seems to be working, I can’t set the network properly. Dunno how to create it’s internal network…

Sorry if i’m too much of a n00b…

Apparently the virtbr1 and virtbr0 are not running. I cannot seem to be able to view them with VMManager unless xen is running. However, if i boot in the xen kernel, I cannot run virtualbox. I am definitely missing something, but I can’t figure out what.

Any ideas on this are more than welcome.

Best Regards,

UPDATE:

I managed to setup an internal network, and managed to set the machines to communicate with one eachother, I am unable to get them to communicate with the internet. All this is happening in virtualbox. In Xen, I am still experiencing the issue with mounting a CD/DVD image. I am not certain whihc of these solutions is best. Xen, or VirtualBox.

If Xen, then how do I mount? Is there a command line to do it.
If VirtualBox then how do I connect externaly?

If you’re running vm manager, mounting a cdrom (and most any other vm modificaiton) should be as easy as simply following my directions to configure a NIC but instead of modifying a NIC instead <add> a storage device (type cdrom).

To use any bridge device (including virbr) you need to make sure it’s enabled, follow the directions in my post to make sure the virtual network is enabled and active, then you should be able to verify its availability using brctl. If it’s available, then any virtualization (including Virtual Box in theory – I’m still working through this but should work) should be able to use the device.

HTH,
TSU

Unfortunately, that doesn’t work. Virtualbox is unable to use the xen networks, even though I try to activate them. It tells that libvrt is not active and is asking for xen to be running.

As for Xen, this is what happens when I try to mount an .iso file in a VM. This happens after I click disconnect on the drive, and then re-connect to mount a new .iso.

http://imageupload.co.uk/files/oue3i1kn9kyf9qj89opg.jpeg](http://imageupload.co.uk/)

then after I click browse local above, i get the following:

http://www.imageupload.co.uk/files/an37irtldd8jw9z6x3i5.jpeg](http://www.imageupload.co.uk/)

and then after I select the .iso I need, this happens:

http://www.imageupload.co.uk/files/0cik791xp8iulocsj7ls.jpeg](http://www.imageupload.co.uk/)

This is the final status shown for the CD-ROM

http://www.imageupload.co.uk/files/5xleltpexuhheu6yvw0c.jpeg](http://www.imageupload.co.uk/)

This is what I’m referring to when I’m saying that mounting .iso is not working .

Kind Regards

From what you’ve posted, I suspect that the libvirt components might have “separated” – I’ve experienced anomalies from time to time, most resolved by either…

  1. Make sure your system is updated. Simply patching may not be sufficient, you may want to install the latest versions of everything including libvirt.
zypper up
  1. If updating doesn’t work, then re-install vm manager
zypper in -f virt-manager virt-utils

BTW - although possibly not critical my personal SOP is to make sure when you open vm manager, it should automatically connect to the localserver and display your Guests. If vm manager isn’t automatically connecting, then doubleclick on the connection to establish the connection. In fact, I’m not sure how your screenshot is displaying your Guest VM properties while also not connected to localhost unless you launched an install from the menu instead of launching your install from vm manager… That itself could be a cause for your error.

TSU

Sorry for the late response. In the first screenshot, the vm-manager is connected. It is beneath the windows, that is why it is not showing. Once it provides me with the iso selection dialogue, it gets disconnected automatically. The VM’s were installed using vm-install from konsole. Launching it from VM did not work. It was erroring out.Will try to uninstall and re-install everything and will let you know once I have anything.

Error starting domain: POST operation failed: xend_post: error from xen daemon: (xend.err ‘Disk image does not exist: /home/thor/e14sp1.iso’)

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 117, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1098, in startup
self._backend.create()
File “/usr/lib64/python2.7/site-packages/libvirt.py”, line 681, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err ‘Disk image does not exist: /home/thor/e14sp1.iso’)

This is what i get when I manually type the path to the .iso in the first screenshot, instead of clicking browse. This error shows when I try to start the guest.I am positive the path is correct:

thor@beliskner:~> cd /home/thor
thor@beliskner:~> ls
bin Documents e14sp1.ISO Music projects public_html test VirtualBox VMs
Desktop Downloads libpeerconnection.log Pictures Public Templates Videos
thor@beliskner:~>

  1. As I suggested before, if you are experiencing anomalies with vm manager,
  • Run “zypper up” to make sure your system has all the ltest packages for your system installed, including vm manager and its dependendencies.
  • If you have still have vm manager problems after “zypper up” then force re-install vm manager using the zypper command I posted. Ordinarily there is no need to uninstall first (I’ve done so only in very extreme sitatuations). Simply doing a force re-install should be sufficient.
  1. Regarding using a bridge device and the virtual network it supports
    <After> you’re certain that vm manager and its related sub-services is working properly, as I described in my earlier post you can enable and start these networking objects using vm manager without launching an actual vm (xen in your case). You can do this from
    vm manager > Edit > Connection Details > Virtual Networks tab > Highligh (select) your configured network.

Once the virtual network has been selected, you can see if it’s running/started or not. If it’s not, simply check the box to start. You can also enable it to “Autostart on Boot” here if you wish.

TSU

Re-installing still didn’t work and I also tested on a home machine and the same thing happened when trying to mount an image. So, I went ahead and re-named the .iso file to .img. That solved the issue right away. I cannot browse to it, but if I type the path manually it will work and mount without issue.

Thank you for all your assistance :).

Very odd.
Out of curiosity,

  1. What Desktop do you have installed?
  2. Are your installs default or have you changed anything (ie not installed or uninstalled anything)?
  3. Have you checked the MD5 sum of your install medium?
  4. See if ISO files are recognized at all as the correct medium(eg CD image). There are a number of ways to do this…
    a. If you have a CD/DVD burning app, it’ll usually have a “Tool” that will analyze the file.
    b. Inspect the File Properties(when named .iso), eg from a File Manager, rt-click an select “Properties”

TSU