# Virt-Manager Interface Issues

## icehac

Hello All,

I am trying to start the interface within virt-manager.  Unfortunately, I am prompted with this error when trying to run the Virtual Network:

"Error starting network 'default': Unable to create bridge virbr0: File exists."

I am also prompted with this error when I try to run the Virtual Interface virbr0 (which was automatically created):

"Error starting interface 'virbr0': this function is not supported by the connection driver: virInterfaceCreate"

I am trying to assign an interface to the VM's to have them NAT to my physical interface (wireless...wlp2s0).  I am not using NetworkManager, and am using wpa_supplicant/dhcpcd instead.

Any ideas?  I'm coming from a redhat background, but am definitely a Gentoo newbie.  Any ideas about how to go about fixing this issue?

Thanks!

----------

## icehac

I was finally able to solve the issue....even though the errors hinted at permission issues (creating the interface), the real culprit was the IPv4 NAT module in the kernel config.  For future reference, if anyone else has this issue, this is how I solved it using "genkernel --menuconfig all"

```
--> Networking Support

   --> Networking Options

      --> Network packet filtering framework (Netfilter)

         --> IP: Netfilter Configuration

<M> IPv4 NAT
```

Hope this helps!

----------

## icehac

Also, those who are attempting to use NATing on their interfaces, here are the iptables rules that I had to establish:

```

# iptables -t nat -A POSTROUTING -o "interface name goes here" -j MASQUERADE

# iptables -I FORWARD 1 -i virbr0 

# iptables -I FORWARD 1 -i virbr0 -j ACCEPT

# iptables -I FORWARD 1 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT

```

As well as the script I used to create the default bridged interfaces (wasn't included with the emerge packages for some reason)[/quote]

virsh net-define /usr/share/libvirt/networks/default.xml

default.xml :

```

<network>

   <name>default</name>

   <bridge name="virbr0"/>

   <forward/>

   <ip address="192.168.122.1" netmask="255.255.255.0">

      <dhcp>

         <range start="192.168.122.2" end="192.168.122.254"/>

      </dhcp>

   </ip>

</network>

```

----------

