Bridged networking with virt-manager 0.8.3

Source: Internet
Author: User
Document directory
  • Create bridge and add interface (s) to it
  • Start up your newly created Bridge
  • Assign physical interface to your guest
Bridged networking with virt-manager 0.8.3 Tuesday, March 16,201 0-Haydn
Solomon

Bridged networking configuration with virt-manager 0.8.3 has
Become much simpler compared to earlier versions. The recent release
Virt-manager 0.8.3 now adds GUI support for bridged networking, bonding
And bridging VLANs. In this post I'll outline the procedure for bridged
Networking since this will be the most popular use of this new Gui
Feature. I'll do a follow up post on bridging VLANs which will be more
Popular within a data center environment. One additional note is that
The time of this writing, this new GUI functionality only supports red
Hat based network configuration files so only distributions such
Fedora and centos will be supported by this procedure.

Let me start by saying that when the current release of virt-Manager
Was released a couple of weeks ago, I was looking forward to using
New "Interface Support". Then I was disappointed to find the GUI kept
Reporting the message "libvirt connection does not have Interface
Support ". I researched the feature set, looked at the code and it
Seemed I had all the pre-requisites for this feature but this message
Was the only thing that showed up for me. So right now I'm sitting in
Hotel (accompanying my wife to a conference she's attending) Writing
Up this post on how I stumbled upon getting this feature to work. It
Happened like this. got to the hotel, booted up my laptop (which runs
Fedora 12 now), connected the hotel provided network cable from my
Laptop to the socket at side of table. As it turns out this socket was
Dead one and I couldn't understand why I wasn't getting a connection.
So I tried restarting my network service a few times and still nothing.
Then I spotted another network wall socket at the back of the table and
Tried that and it worked. Next I started up virt-manager and configured
New virtual network to Nat my KVM windows guest to the Ethernet
Interface. I just happened to take a peek at the "Network Interfaces"
Tab under edit-> host details on my virt-manager Main Window and Lo
And behold my host interfaces were listed !! I played around
Different sequences of starting up network services and virt-manager and
Only one works for me which is:

  1. If virt-manager is running, close and exit virt-Manager. Make sure
    You exit and don't just close the main window.
  2. Restart network service.
  3. Start up virt-manager.

You'll now be able to see your host interfaces listed under
Edit-> host details-> network interfaces. If you have a different
Experience with this feature please post a comment as I'm curious about
This bug. This may not be the case for remote connections. So once
You 've got your physical host interface listed you will be able
Configure bridged networking using the following procedure.

 

Create bridge and add interface (s) to it

First thing you need to do is create a new bridge and attach your
Host interface (s) to it. virt-manager CILS your host interfaces "slave
Interfaces "which is an accurate term to describe what happens. If you
Have a single Ethernet interface on your host and add this to your new
Bridge, your host will not have access to your Ethernet Interface
Anymore as it is now uses your new bridge like a gateway. You create
New Bridge by clicking on the plus sign at the bottom of the "Network
Interfaces tab.

You'll get a two step dialog as shown below with a drop down list
Options for interface types to create. The first and default in the list
Is "bridge" which is what you want to create.

After selecting next, virt-manager will name the new bridge that will be
Created using the Convention of brx where x starts at 0 and increments
Everytime you create a new bridge unless using hotplug mode. You can
Override this name if you want. You'll also see a list of interfaces
To add to your new bridge.

If you think you'll need to add more interfaces then choose hotplug
As the start mode. You can also select activate now if you want your
Bridge to be enabled immediately However this will momentarily disrupt
The network interfaces on your host as it goes through the initiation
Process. The default option of none for start mode and "activate now"
Option unchecked is so that you don't unwillinugly bring down your
Network. Click Finish and you're done. If you 've configured bridged
Networking before using previous versions of virt-manager as described
In this post
, You 'd have to agree that this is much more automatically.
Kudos to the virt-manager, libvirt and netcf
Developers for bringing network configurations this far along.

 

Start up your newly created Bridge

Your new bridge will not be started by default if you used
Default options when creating your new bridge. To start up your new
Bridge, select it in the "Network Interfaces" tab and click the "play"
Button which is shown in the image below.

You'll now notice that your bridge is not greyed out anymore. You'll
Also notice that if you select any of your physical interfaces attached
To your bridge, it will show the status of "in use by: br0 ".

 

Assign physical interface to your guest

The final step in this procedure is assigning your physical interface
To your guest. To do this, open up a guest console within virt-Manager
And click the "add Hardware" button. Next, select hardware type
Network and click "Forward". virt-manager will now show an option to use
Your host interface connected to the bridge you just created as shown
Below. Select this.

Click "Forward" then finish and you're all done. At this point you'll be
Able to access your guest machine from your local network like any
Other host on your network. Give this procedure and try and see how it
Works for you if you're re running a red hat based distro. As always, feel
Free to post questions or comments.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.