1

I am having real trouble creating a network bridge on my Debian system so I can run Qemu VM's under virsh.

I have the NIC connected via ethernet, and the IP reserved via the MAC address on the router to 192.168.1.2.

I am trying to create a bridge so the VM's can use that under DHCP (which I will then reserve on the router), unless making the IPs static is better?

My default network/interfaces file includes;

auto lo
iface lo inet loopback

To create my bridge, I tried to enter the following from the official Debian website:

# The loopback network interface
 auto lo br0
 iface lo inet loopback

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
 iface eth0 inet manual

# Bridge setup
 iface br0 inet dhcp
 bridge_ports eth0

Unfortunately this kills the network.

I have done a ton load of Googling on this one, spent hours trying to get it to work. Even passthru kills the host network but lets the guest connect.

Any help would be great before I give up with Qemu and use Virtualbox

2 Answers 2

2

You need to set an address for the bridge interface if you want the host itself to have a network connection too. I have something like this on one machine:

auto br0
iface br0 inet static
        bridge_ports eth0
        bridge_maxwait 4
        address 1.2.3.4
        netmask 255.255.255.0
        network 1.2.3.0
        broadcast 1.2.3.255
        gateway 1.2.3.1
        dns-nameservers 1.2.3.1
        dns-search some.domain

See also: https://wiki.debian.org/NetworkConfiguration#Bridging

1
  • Thanks, after a long time trying to suss it out. I was missing br0 form the loopback :(. Thanks for your help! Commented Oct 17, 2016 at 20:29
-1

Don't beat your head against the wall. Use virt-manager to setup your workstation and create your VMs. I've used KVM/QEMU for more than 10 years on 6 different distributions without ever having to manually configure anything.

apt-get install virt-manager qemu-kvm

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.