KVM Virtual Machines are NOT connected to the network

Issues related to configuring your network
Post Reply
GioMBG
Posts: 59
Joined: 2012/02/27 00:28:14
Location: Conthey Suisse
Contact:

KVM Virtual Machines are NOT connected to the network

Post by GioMBG » 2019/10/15 23:27:54

Hi All,
I've just installed KVM and I just successfully start my first Virtual Machine and everything seems go perfect except that is impossible connect the Virtual Machine to the network, and I suppose because I not create the bridge or my bridge is to set up correctly.
Basically I don't know how to create / configure the bridge for make all Virtual Machines created to be connected to the network...
here my brctl show :

Code: Select all

[root@CentOS-76-64-minimal network-scripts]# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.000000000000	no		
virbr0		8000.525400bb0f29	yes		virbr0-nic
any suggestions ?
always thanks
Gio

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: KVM Virtual Machines are NOT connected to the network

Post by jlehtone » 2019/10/16 06:03:16

How do you define "connected to network"? Passthrough, bridged, routed, routed with NAT?

GioMBG
Posts: 59
Joined: 2012/02/27 00:28:14
Location: Conthey Suisse
Contact:

Re: KVM Virtual Machines are NOT connected to the network

Post by GioMBG » 2019/10/16 07:08:22

hi jlehtone,
I think "bridged" as bridged my server connection to all the KVM Virtual Machines.
also as, in the Virtual Machine, have the possibility to open a browser and surf internet as open a shell and ping google.com,
at now this is impossible.
note that, of course, from the server shell I can ping google also because I can access to the machine...
always thanks
Gio

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: KVM Virtual Machines are NOT connected to the network

Post by jlehtone » 2019/10/16 08:03:22


GioMBG
Posts: 59
Joined: 2012/02/27 00:28:14
Location: Conthey Suisse
Contact:

Re: KVM Virtual Machines are NOT connected to the network

Post by GioMBG » 2019/10/16 20:36:44

Hi jlehtone,
The machine in the tutorial you link here seems totally different from my Hetzner image which seems very un-original like all Hetzner images...
in all tutorials they speak about some ifcfg-... that never I found on my machine that is always different from all the tutorials I found around :

Code: Select all

cd /etc/sysconfig/network-scripts/
-rw-r--r-- 1 root root   254 29 mar  2019 ifcfg-lo
-rw-r--r-- 1 root root   254 16 ott 15.08 ifcfg-lo.backup
lrwxrwxrwx 1 root root    24 16 ott 14.50 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x 1 root root   654 29 mar  2019 ifdown-bnep
-rwxr-xr-x 1 root root  6532 29 mar  2019 ifdown-eth
-rwxr-xr-x 1 root root  6190  9 ago 16.31 ifdown-ib
-rwxr-xr-x 1 root root   781 29 mar  2019 ifdown-ippp
-rwxr-xr-x 1 root root  4540 29 mar  2019 ifdown-ipv6
lrwxrwxrwx 1 root root    11 16 ott 14.50 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x 1 root root  2130 29 mar  2019 ifdown-post
-rwxr-xr-x 1 root root  1068 29 mar  2019 ifdown-ppp
-rwxr-xr-x 1 root root   870 29 mar  2019 ifdown-routes
-rwxr-xr-x 1 root root  1456 29 mar  2019 ifdown-sit
-rwxr-xr-x 1 root root  1462 29 mar  2019 ifdown-tunnel
lrwxrwxrwx 1 root root    22 16 ott 14.50 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x 1 root root 12415 29 mar  2019 ifup-aliases
-rwxr-xr-x 1 root root   910 29 mar  2019 ifup-bnep
-rwxr-xr-x 1 root root 13475 29 mar  2019 ifup-eth
-rwxr-xr-x 1 root root 10114  9 ago 16.31 ifup-ib
-rwxr-xr-x 1 root root 12075 29 mar  2019 ifup-ippp
-rwxr-xr-x 1 root root 11893 29 mar  2019 ifup-ipv6
lrwxrwxrwx 1 root root     9 16 ott 14.50 ifup-isdn -> ifup-ippp
-rwxr-xr-x 1 root root   650 29 mar  2019 ifup-plip
-rwxr-xr-x 1 root root  1064 29 mar  2019 ifup-plusb
-rwxr-xr-x 1 root root  4997 29 mar  2019 ifup-post
-rwxr-xr-x 1 root root  4154 29 mar  2019 ifup-ppp
-rwxr-xr-x 1 root root  2001 29 mar  2019 ifup-routes
-rwxr-xr-x 1 root root  3303 29 mar  2019 ifup-sit
-rwxr-xr-x 1 root root  2711 29 mar  2019 ifup-tunnel
-rwxr-xr-x 1 root root  1836 29 mar  2019 ifup-wireless
-rwxr-xr-x 1 root root  5419 29 mar  2019 init.ipv6-global
-rw-r--r-- 1 root root 20671 29 mar  2019 network-functions
-rw-r--r-- 1 root root 31027 29 mar  2019 network-functions-ipv6
so I don't know where to edit specially because I'm newbie of KWM and bridging etc.
if possible, I need help seeing exactly my configuration
thx

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: KVM Virtual Machines are NOT connected to the network

Post by jlehtone » 2019/10/17 11:43:53

Some tutorials are not proper.
Some good tutorials were written a while ago, for different systems. Therefore, they don't apply.
The most(ly) accurate documentation for CentOS 7 is Red Hat's material about RHEL 7.
Whatever Hetzner is, whatever they do, if you pay for them, then their documentation and support should be closest to the point.


The important thing is to find out what you have (currently) and what you should have (bridged VMs).
How to get there, is secondary and based on knowledge.

The default method to configure network in CentOS 7 is NetworkManager.
If you have it, then

Code: Select all

systemctl status NetworkManager
nmcli
nmcli d s
nmcli c s
do show information.

The legacy method is network.service. Similar info shows up with:

Code: Select all

systemctl status network
ip ad
ip ro
If Hetzner have their own system, then that should be used to do configuration.
The above commands can nevertheless reveal something.

Post Reply