[TriLUG] Ubuntu and KVM

Jason Herr hobie at mail.com
Wed Aug 19 20:28:33 EDT 2009


Yeah, you've gotta get the bridge working well enough to have the server 
stable.   I'm going to split your post up into issues for you to have to 
handle.


First, we need to get the bridge running properly in the server.
 > OK, back to /etc/network/interfaces.  In the "host" machine, I found it
 > with br0 and br1, as well as several br0:x interfaces defined.
 >

What are the bridge endpoints?  There should just be the ethX interface.

 > According to the wiki page, only br0 should be necessary, or is that
 > just an "example" simplification?
 >
I get the impression that it is a simplification.   You might be able to 
have one bridge / subnet and nic.  VMware ESX's networking has much more 
flexibility in this area.

 > Every time that I have got close to the example configuration, the host
 > machine's communications have got very shakey.
 >
 > This last time, I put in exactly that example configuration ( with my
 > own IP, netmast, etc. ) and it really went away.  I am just waiting for
 > someone on the left coast to get into the colo and attach and read the
 > console for me.
 >

Y'know, if the bridges are operable and have only one endpoint which is 
a connected nic, then they should be ok.  Choose one that's on the right 
subnet, and keep that in mind.

 >
 > If I had it working, should the system automatically assign a br0:99 for
 > the new guest ( child ) when it starts?
 >

Did not for me.  I have just the one bridge and it's all good no new one 
was created for the box.  I'm only running one extra VM this minute, but 
I believe other bridges are for other subnets.  I start with one bridge 
that works as the server's NIC and booting the VM does nothing to this 
status.  The VM is just using the bridge as its output too.

 >
 > And, as I suspect you are going to say, if I made sure that the
 > libvirt.xml file ONLY said Bridge, this would be true.
 >

No, I didn't end up using the libvirt file changes.

Try this:
0.  Shutdown the VM
1.  Back up the VM's file.
2.  Use virsh and run dumpxml <domain>
3.  Modify the dumped xml file to have a new domain name, use the backup 
filename for the drive, uuid and use this for the networking:


     <interface type='bridge'>
       <source bridge='br0'/> <!-- This is the bridge that has only one 
endpoint and is on the subnet you intend to use -->
       <mac address='<you know>'/>
       <model type='virtio'/>
     </interface>


-- Let me know how that works for you.

J


Brian McCullough wrote:
> On Wed, Aug 19, 2009 at 02:12:59PM -0400, Jason Herr wrote:
>> I ran into this earlier...   Here's what I used for Ubuntu:
>>
>> https://help.ubuntu.com/community/KVM/Networking
> 
> Yup.  Been there several times.
> 
> 
>> Basically, you set up a bridge interface and run your server's network 
>> through it.  
> 
> That has been done in several ways.  I'll talk about them later.
> 
> 
>> You can then configure the vm's xml file to use it and/or 
>> put the change into the template file for libvirt.   There are 
>> side-effects.  Root access is needed to bring up the tap access for the 
>> bridging.
> 
> I'm not certain that that is correct.  As I said, I am inheriting this.
> 
> I did make a copy of the libvirt.xml ( was that the name ) file and
> removed references to the "default" network, but I suspect that that
> isn't being used yet.
> 
> 
>> There were assumptions made in that document that I'm still not sure I 
>> get.  NetworkManager fights against that process pretty hard, so you'll 
>> need to disable it (my update to the wiki).  
> 
> Yes, it's already been removed from the machine.
> 
> 
>> Also, I'd suggest doing 
>> this configuration change locally or via a IP-based KVM switch since 
>> you're so far away.  My server got knocked off the net doing this the 
>> first time.  
> 
> Yup.  Been there, did that a couple of times.  Fortunately, except for
> this last time, it recovered and I was able to get back in.
> 
> 
> OK, back to /etc/network/interfaces.  In the "host" machine, I found it
> with br0 and br1, as well as several br0:x interfaces defined.
> 
> According to the wiki page, only br0 should be necessary, or is that
> just an "example" simplification?
> 
> Every time that I have got close to the example configuration, the host
> machine's communications have got very shakey.
> 
> This last time, I put in exactly that example configuration ( with my
> own IP, netmast, etc. ) and it really went away.  I am just waiting for
> someone on the left coast to get into the colo and attach and read the 
> console for me.
> 
> 
> If I had it working, should the system automatically assign a br0:99 for
> the new guest ( child ) when it starts?
> 
> That's the behaviour that I remember from when I was first building my
> Xen machines.  You don't do something frequently enough, and you lose
> track!
> 
> 
> And, as I suspect you are going to say, if I made sure that the
> libvirt.xml file ONLY said Bridge, this would be true.
> 
> 
> Thank you for the guidance,
> Brian
> 
> 
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
> 
> 




More information about the TriLUG mailing list