Fwd: Question on setting up networkin in Qemu

Jonathan Jesse jjesse at iserv.net
Mon Jan 9 17:43:02 GMT 2006

On Friday 06 January 2006 14:23, Jonathan Jesse wrote:
> I sent this email to the users list and no one was able to help me out.  
> I'm trying to use qemu on Breezy to get things working with networking.  Is
> there anyone using qemu for virtual pcs?
> I know there are breezy virtual machines that i can use w/ the VMWare
> Player, but with qemu I can run muliple OSes if I can get networking to
> work.
> Any help would be great.
> sudo qemu -hda dapper.img shows me connected to tun0 but I can't get
> ----------  Forwarded Message  ----------
> Subject: Question on setting up networkin in Qemu
> Date: Tuesday 03 January 2006 12:24
> From: Jonathan Jesse <jjesse at iserv.net>
> To: kubuntu-users at lists.ubuntu.com
> I don't know if anyone has worked w/ Qemu but I'm struggling on getting
> networking to work on my virtual machines.  I think I have the bridging
> setup correctly using the bridge control package, but what I'm having
> issues with is tunneling it correctly.  Is there a module or something
> special I need in the kernel to enable tunneling?
> Any help would be greatly appreciated, thanks
> Jonathan
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/kubuntu-users
> -------------------------------------------------------

Ok here is how I got it up and running w/ Networking.  I can now run apt-get 
update and get eveyrthing correctly.  I also have networking w/ a windows XP 
image as well.

Install the bridge-utils package, apt-get install bridge-utils or use it 
through adept.

If you have installed qemu through apt-get install qemu, or your favorite 
package manager, the default qemu-if script is located at /etc/qemu-if.
Edit that file:
sudo nano /etc/qemu-if 

 echo "Executing /etc/qemu-ifup" 
 echo "Bringing up $1 for bridged mode..." 
 sudo /sbin/ifconfig $1 promisc up 
 echo "$Adding $1 to br0.." 
 sudo /usr/sbin/brctl addif br0 $1 

Is then what this looks like.  

Edit your /etc/network/interfaces file as well

sudo nano /etc/network/interfaces and add in br0 as an interface.  I have 
setup mine so br0 starts automatically and grabs an address from DHCP
# This is a list of hotpluggable network interfaces. 
 # They will be activated automatically by the hotplug subsystem. 
 mapping hotplug 
 script grep 
 map eth0 
 # The primary network interface 
 iface eth0 inet dhcp 
 # Bridge 0 
 auto br0 
 iface br0 inet dhcp 

Now when I start qemu (sudo qemu -hda dapper.img) I have a dapper drake image 
running with internet connection.  When you start qemu you should see 
connected to br0.

THat should be it, good luck to all


More information about the kubuntu-users mailing list