# kvm with virt-manager (no virtual network)

## cwc

I'm trying to setup kvm with the virt-manager and I don't have a virtual network.

I'm running systemd gnome and systemd shows libvirtd is running.

       loaded active running   Virtualization daemon                                                            

Please throw me a bone if you've got kvm working on gentoo.

I'm stuck on the virtual network part.

I looked at this guide 

https://www.linux-kvm.org/page/KvmOnGentoo#Network_setup

```

Network setup

Bridged

    edit /etc/conf.d/net

     config_eth0="null" # any any other interfaces you want to bridge

     bridge_brkvm="eth0"

     config_brkvm="192.168.254.254/24"  # the ip of the original eth0, or dhcp

     brctl_brkvm="setfd 0

        sethello 30

        stp off"

    cd /etc/init.d

    ln -s net.lo net.brkvm

    rc-update add net.brkvm default

    rc-update del net.eth0 default

```

Then I read this post and noticed the network configuration.

This looks better.

https://www.agix.com.au/install-kvm-qemu-gentoo/

```

dns_domain_lo="agix.lan"

config_eth0="10.0.0.1/24"

#

#Additions for KVM

#

config_eth1="null"

bridge_br0="eth1"

config_br0="10.0.0.2/24"

brctl_br0="setfd 0

   stp off"

```

----------

## NeddySeagoon

cwc,

You need to translate it to systemdspeak.

```
# eth interfaces for firewall

# we don't want them getting IP addresses

# as they are being donated to bridges

config_eth0="null"

config_eth1="null"

config_eth2="null"

config_eth3="null"

config_eth4="null"

bridge_br0="eth1"

# the DMZ

bridge_br1="eth2"

config_br1="192.168.10.254/24"

# wireless

bridge_br2="eth3"

config_br2="192.168.54.254/24"

# protected wired

bridge_br3="eth4"

config_br3="192.168.100.254/24"
```

This is all on the host.  I've left out the routing things.

When you create your guest in libvirtd, it will show you the bridges to connect the network too.

I have donated real hardware to the bridges but thats not required.

You can route a range of addresses to a bridge with no hardware on the host too. That works.

----------

## cwc

thank you!

I'll work on this and post back.

----------

## cwc

Neddy,

I added the following to   /etc/conf.d/net and virt-manager did not pick up anything.

dns_domain_lo="ciclo.ioe"

config_eth0="192.168.1.7 netmask 255.255.255.0 brd 192.168.1.255"

routes_eth0="default via 192.168.1.1"

config_eth1="null" 

config_eth2="null" 

bridge_br0="eth1" 

--------

I'm running systemd with Gnome.

I'd like to set up my nic as eth0 and bypass the Gnome networkmanager .  But I'll need some guidance.

```

ifconfig 

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.7  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::7abf:2691:77d0:a813  prefixlen 64  scopeid 0x20<link>

        ether 1c:87:2c:55:cf:e3  txqueuelen 1000  (Ethernet)

        RX packets 235191  bytes 211379718 (201.5 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 114463  bytes 22357898 (21.3 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1  (Local Loopback)

        RX packets 572  bytes 46176 (45.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 572  bytes 46176 (45.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ciclo /etc/conf.d # grep -rnw '/' -e 'enp2s0'

/run/udev/data/n2:2:E:DEVPATH=/devices/pci0000:00/0000:00:04.0/0000:02:00.0/net/enp2s0

/run/udev/data/n2:4:E:INTERFACE=enp2s0

/run/udev/data/n2:9:E:ID_NET_NAME_PATH=enp2s0

/run/udev/data/n2:22:E:ID_NET_NAME=enp2s0

/run/udev/data/n2:23:E:SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp2s0 /sys/subsystem/net/devices/enp2s0

/etc/systemd/network/static.network:2:Name=enp2s0

/etc/NetworkManager/system-connections/enp2s0-bdad2230-eae8-4606-844b-ef2cd99f84b5:2:id=enp2s0

/etc/NetworkManager/system-connections/enp2s0-bdad2230-eae8-4606-844b-ef2cd99f84b5:6:interface-name=enp2s0

```

Thanks.

Please throw me another bone.

----------

