LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-26-2019, 11:31 AM   #1
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Rep: Reputation: 0
KVM VM Networking Issue


My machine was running CentOS 6 with 6 KVM VM machines with my entire network using 192.168.1.0/24. Every machine on my network could all 'see' each other and talk to the internet via my gateway 192.168.1.1.

I decided to convert this machine to CentOS 7 using software raid-1 and raid-10. I was using this large hosts file that had to be propagated everywhere so I decided to use bind to keep the hosts file small - so I ended up with my DNS server using 192.168.1.135 and all was well.

This machine came with 2 NICS on the MB and I added a Intel 4-port NIC. What I did was to take eth1 and eth5 creating bond0 and then made br0 from that.

All of the KVM VNs worked perfectly communicating through the bridge. I could log on the the VMs and talk to every system on my network.

When I converted to CentOS 7 and built the DNS and bond0 and the bridge br0 I built a single VM to test but it would not communicate over the 192.168.1.0/24 network. It only wanted to talk via the vibr0 network which was 192.168.122.0/24.

How can I fix this? What is the problem? Why are some things so simple with CentOS 6 but is difficult on CentOS 7?

TIA
Gene
 
Old 04-26-2019, 05:43 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Just curious: What is more difficult in Centos 7? Libvirt has not changed from 6 to 7.

If your VM uses virbr0 instead of br0, you connected it to Libvirts’s default NAT network instead of br0. Run virsh domiflist to confirm that.
 
Old 04-27-2019, 03:37 PM   #3
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
I see what you are saying but in contrast compare the parameters between CentOS 6 virt-install and CentOS 7 virt-install there are differences. But what is important to me is the parameter network=bridge=br0 works with CentOS 6 but under CentOS 7 it still wants to use virbr0 (which uses 192.168.122.0/24). But my entire network runs under 192.168.1.0/24. And the IP address for the VM I built must be 192.168.1.125 so satisfy DNS and various hosts files.
Also, the command you me to run doesn't exist under CentOS 7.6.

Gene
 
Old 04-27-2019, 09:54 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by etpoole60 View Post
Also, the command you me to run doesn't exist under CentOS 7.6.
I have a Centos 7.6 server here. While I can't quickly run virt-install on it (it's not installed, I would have to create a bridge and don't want to interfere with the remaining setup, etc), I tried virsh domiflist:
Code:
$ sudo virsh domiflist instance-00000005
Interface  Type       Source     Model       MAC
-------------------------------------------------------
tapd26c8a12-02 bridge     qbrd26c8a12-02 virtio      fa:16:3e:3a:07:ad

$ brctl show
bridge name     bridge id               STP enabled     interfaces
qbr2f91a3fd-f8          8000.f21ff11a76a6       no              qvb2f91a3fd-f8
qbr82c168ef-4f          8000.da695ee260bd       no              qvb82c168ef-4f
qbrd26c8a12-02          8000.0e60b659618e       no              qvbd26c8a12-02
$ cat /etc/*release
CentOS Linux release 7.6.1810 (Core)
(...stuff deleted...)
$ yum provides virsh
(...stuff deleted...)
libvirt-client-4.5.0-10.el7_6.6.x86_64 : Client side utilities of the libvirt library
Repo        : @updates
Matched from:
Filename    : /usr/bin/virsh
$ rpm -qa|grep libvirt-client
libvirt-client-4.5.0-10.el7_6.6.x86_64
This VM is connected to a Linuxbridge. virsh is in the libvirt-client package. Is it installed on your server?

Last edited by berndbausch; 04-27-2019 at 10:02 PM.
 
Old 05-03-2019, 03:53 PM   #5
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
OK - I'm building this virtual environment based upon an example I found in www.server.world.info. A soon as I complete it I will respond.

Gene
 
Old 05-03-2019, 06:07 PM   #6
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
Here is the command I used to create my virtual machine:
virt-install --connect qemu:///system --name jpd1vm01 --ram 2048 --vcpus=2 --disk /jpdvmnfs/jpdsys1/jpd1vm01.qcow2,size=128 --cdrom=/jpdiso/isoimages/centos/CentOS-7-x86_64-DVD-1708.iso --vnc --os-type=linux --os-variant=centos7.0 --accelerate --network bridge=virbr1 --hvm

During the install I updated the hostname and all of the network parameters for eth0.

The install went normally but I have no network access to any network (the ping to gateway, 192.168.1.1, fails). I tries to add an additional NIC but I have no idea where the basic definition are in CentOS 7 (I looked at /etc/udev/rules.d but no network information there).

I attempted to add an additional NIC to see what would happen but no luck.

Just seems things were very simple under CentOS 6.

Gonna try and add another VM with both the default virbr0 and my virbr1 to see what happens.

Gene
 
Old 05-03-2019, 06:36 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by etpoole60 View Post
Here is the command I used to create my virtual machine:
virt-install --connect qemu:///system --name jpd1vm01 --ram 2048 --vcpus=2 --disk /jpdvmnfs/jpdsys1/jpd1vm01.qcow2,size=128 --cdrom=/jpdiso/isoimages/centos/CentOS-7-x86_64-DVD-1708.iso --vnc --os-type=linux --os-variant=centos7.0 --accelerate --network bridge=virbr1 --hvm
In the original post you talked about br0 and bond0, so allow me to confirm: The virt-install command specifies virbr1 as network, yet the VM is attached to virbr0. Correct?
Quote:
The install went normally but I have no network access to any network (the ping to gateway, 192.168.1.1, fails).
Are you sure that virbr1 has connectivity to 192.168.1.1? Can the VM ping the IP address of virbr1?
Quote:
I tries to add an additional NIC but I have no idea where the basic definition are in CentOS 7 (I looked at /etc/udev/rules.d but no network information there).
To add a NIC to the VM at creation time, repeat the virt-install option —network. To add a NIC to an existing VM, use virsh attach-interface.

Do you have an up-to-date version of virsh? virsh domiflist still doesn’t work?
 
Old 05-03-2019, 08:16 PM   #8
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
Here's what I found:
  • With CentOS 6 I bond 2 physical NICs creating bond0; I then created br0 from bond0 - This worked just fine with CentOS 6.
  • With CentOS 7 I bond the same 2 NICs creating bond0; I then created virbr1 (the name virbr0 was already used) from bond0 - This does not work under CentOS 7.
  • Using virt-manager I created br1 and pointed it to virbr1 and lo and behold I can see my existing lan and wan.

Note: Because it worked in CentOS 6 does not mean it will work in CentOS 7. Who was that who said KVM is the same in CentOS 7 as it was in CentOS 6???

Gene
 
Old 05-04-2019, 12:49 AM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by etpoole60 View Post
With CentOS 7 I bond the same 2 NICs creating bond0; I then created virbr1 (the name virbr0 was already used) from bond0 - This does not work under CentOS 7.
In case you are still interested in this problem: What exactly doesn’t work? The formation of a bond? Centos 7 does have an alternative way to bond creation, named teaming. Or the creation of a bridge that includes the bond? Should be the same on Centos 6 and 7.
Quote:
Who was that who said KVM is the same in CentOS 7 as it was in CentOS 6???
I did, or rather I said that libvirt is the same. I see you have problems setting up your network structure, but I don’t see how this is related to the libvirt version.
 
1 members found this post helpful.
Old 05-12-2019, 02:12 PM   #10
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
I'm closing this based upon my latest post 'A Major Network Issue To Me'.

TIA
Gene
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "No KVM, No qemu-kvm" Available error while trying to install KVM on CentOS 6.3 sriramdas Linux - Virtualization and Cloud 5 01-01-2013 10:46 AM
[SOLVED] Centos 6 and KVM - how to setup bridged networking in KVM in a -Class B- environment? rylan76 Linux - Virtualization and Cloud 7 11-07-2012 06:46 AM
KVM on Redhat 5.7: KVM can ping outside network, outside network can't ping KVM svandyk Linux - Networking 1 09-23-2011 06:45 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration