Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kvm with virt-manager (no virtual network)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1080
Location: Tri-Cities, WA USA

PostPosted: Sun Aug 05, 2018 1:39 pm    Post subject: kvm with virt-manager (no virtual network) Reply with quote

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

Code:

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/


Code:

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"


_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Sun Aug 05, 2018 3:12 pm    Post subject: Reply with quote

cwc,

You need to translate it to systemdspeak.
Code:
# 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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1080
Location: Tri-Cities, WA USA

PostPosted: Sun Aug 05, 2018 4:52 pm    Post subject: Reply with quote

thank you!
I'll work on this and post back.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1080
Location: Tri-Cities, WA USA

PostPosted: Tue Aug 07, 2018 1:34 pm    Post subject: Reply with quote

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.

Code:

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.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum