Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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?
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???
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.