ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unsolved Help me understand KVM Networking

    IT Discussion
    kvm networking setup help fedora fedora 27 cockpit
    8
    29
    4.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      Alright, I have been tinkering with KVM for months and have no general issues with basic functionality.

      Now, I want to turn up my lab as if it were production.

      To my understanding, this means a network team and a bridge instead of using the macvtap settings.

      I used Cockpit to setup the Team and the Bridge. But when I make a VM on the bridge, it never pulls a DHCP address.

      So I am obviously doing something wrong.

      My google skills failed last night as everything was returning results from 2010 or so.

      Here is my host, my old desktop.
      0_1514476879082_8caa13fc-d0a3-4862-bac2-3f60999a85e1-image.png

      This is what it looks like now from the host.
      0_1514476943881_c536c879-19b6-4331-befe-d59482e20696-image.png

      I first made the Team selecting the two interfaces on my Intel dual port card. Like this.
      0_1514477099020_04d9c26b-8954-4512-aaf6-dcd42496bb08-image.png

      I then added the bridge with these settings. I tried both with and without STP on.
      0_1514477168667_929fffb7-1e59-401a-8da8-92545f1493a1-image.png

      In VMM, the network looks like this. But when powered on, the VM never pulls an IP address.
      0_1514477213923_5b061c8f-97ab-466b-a540-422e5ea98307-image.png

      So, I obviously am missing something on how to setup a bridge for use with libvirt. I can easily remove the bridge and then selected the team and use a macvtap bridge, like this.
      0_1514477363096_123a560f-667f-4b25-b980-e1b45c97951b-image.png

      M 1 Reply Last reply Reply Quote 1
      • M
        mattbagan @JaredBusch
        last edited by

        @jaredbusch I've always had an issue with the Network source in VVM being "empty" when selecting the bridge interface. After a reboot that seems to fix it. Now I don't have a team setup so that may be different.

        1 Reply Last reply Reply Quote 0
        • FATeknollogeeF
          FATeknollogee
          last edited by

          I end going here & toggling a few of these switches...that then gets me an IP address.

          0_1514480606995_kvm.png

          1 Reply Last reply Reply Quote 0
          • black3dynamiteB
            black3dynamite
            last edited by

            Have you already check out this site about bridge?
            https://fedoramagazine.org/build-network-bridge-fedora/

            JaredBuschJ 1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch @black3dynamite
              last edited by

              @black3dynamite said in Help me understand KVM Networking:

              Have you already check out this site about bridge?
              https://fedoramagazine.org/build-network-bridge-fedora/

              I do not have any issues creating a bridge. CLI or Cockpit GUI. I am trying to use it

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch
                last edited by

                When I delete the bridge, and then select this configuration:

                0_1514477363096_123a560f-667f-4b25-b980-e1b45c97951b-image.png

                The VM immediately pulls an IP.
                0_1514489366662_96a03896-e698-4602-adbe-fc1adde999fe-image.png

                1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates
                  last edited by

                  I’ve never done it through Cockpit. I’ve always used either nmcli or nmtui to create everything. What do your ifcfg files look like for those interfaces?

                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                  • stacksofplatesS
                    stacksofplates
                    last edited by

                    I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                    JaredBuschJ 2 Replies Last reply Reply Quote 1
                    • JaredBuschJ
                      JaredBusch @stacksofplates
                      last edited by

                      @stacksofplates said in Help me understand KVM Networking:

                      I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                      Well, I cannot think of a reason to require host to guest communication, except that I may want to connect from a guest to the host to update the ISO store I use occasionally.

                      stacksofplatesS 1 Reply Last reply Reply Quote 1
                      • JaredBuschJ
                        JaredBusch @stacksofplates
                        last edited by

                        @stacksofplates said in Help me understand KVM Networking:

                        I’ve never done it through Cockpit. I’ve always used either nmcli or nmtui to create everything. What do your ifcfg files look like for those interfaces?

                        As I had removed it to test the macvtap, i had to recreate it. I did it with nmcli this time.

                        jbusch@dt-jared ~]$ ssh 10.254.103.5
                        Last login: Thu Dec 28 00:05:54 2017 from 10.254.103.200
                        [jbusch@kvm ~]$ su -
                        Password: 
                        [root@kvm ~]# nmcli connection add ifname bridge0 type bridge con-name bridge0
                        Connection 'bridge0' (0febbbde-8d06-475a-a21b-a88ebdf006d8) successfully added.
                        [root@kvm ~]# nmcli connection add type bridge-slave ifname team0 master bridge0
                        Connection 'bridge-slave-team0' (d44dd210-92d7-4337-b4dd-66afbd048370) successfully added.
                        [root@kvm ~]# nmcli connection modify bridge0 bridge.stp no
                        [root@kvm ~]# 
                        
                        1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates
                          last edited by

                          Do the guests have network access if you give them a static address?

                          JaredBuschJ 1 Reply Last reply Reply Quote 1
                          • stacksofplatesS
                            stacksofplates @JaredBusch
                            last edited by

                            @jaredbusch said in Help me understand KVM Networking:

                            @stacksofplates said in Help me understand KVM Networking:

                            I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                            Well, I cannot think of a reason to require host to guest communication, except that I may want to connect from a guest to the host to update the ISO store I use occasionally.

                            Ya that's really the only advantage to a full bridge.

                            JaredBuschJ 1 Reply Last reply Reply Quote 1
                            • JaredBuschJ
                              JaredBusch @stacksofplates
                              last edited by JaredBusch

                              @stacksofplates said in Help me understand KVM Networking:

                              @jaredbusch said in Help me understand KVM Networking:

                              @stacksofplates said in Help me understand KVM Networking:

                              I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                              Well, I cannot think of a reason to require host to guest communication, except that I may want to connect from a guest to the host to update the ISO store I use occasionally.

                              Ya that's really the only advantage to a full bridge.

                              And for my lab, colo, and most clients, I do not see that ever being an issue.

                              But I do have one specific client that will have a stand alone RHEL 7 box running KVM on a remote site. It will be running a single VM. I will have easy access to the VM, but not the host, because of "reasons" that have nothing to do with IT.

                              stacksofplatesS ObsolesceO 2 Replies Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                [root@kvm ~]# nmcli connection show
                                NAME                UUID                                  TYPE            DEVICE   
                                Wired connection 1  5371d5ee-0c26-3e5a-ae0d-6d3683d7d584  802-3-ethernet  enp1s0f0 
                                Wired connection 2  a2977c44-7e0a-3f9d-8ecc-74e222e150a9  802-3-ethernet  enp1s0f1 
                                bridge0             0febbbde-8d06-475a-a21b-a88ebdf006d8  bridge          bridge0  
                                eno1                3a2e709f-49c8-3ac8-aa99-aab4d616e650  802-3-ethernet  eno1     
                                team0               74aa71fe-e149-49e9-94ce-ab4a22a319e4  team            team0    
                                virbr0              0df1e6b8-e9e2-4538-a581-0f1c727495c4  bridge          virbr0   
                                bridge-slave-team0  d44dd210-92d7-4337-b4dd-66afbd048370  802-3-ethernet  --       
                                [root@kvm ~]# 
                                
                                1 Reply Last reply Reply Quote 0
                                • JaredBuschJ
                                  JaredBusch @stacksofplates
                                  last edited by

                                  @stacksofplates said in Help me understand KVM Networking:

                                  Do the guests have network access if you give them a static address?

                                  I will try that.

                                  1 Reply Last reply Reply Quote 0
                                  • stacksofplatesS
                                    stacksofplates @JaredBusch
                                    last edited by stacksofplates

                                    @jaredbusch said in Help me understand KVM Networking:

                                    @stacksofplates said in Help me understand KVM Networking:

                                    @jaredbusch said in Help me understand KVM Networking:

                                    @stacksofplates said in Help me understand KVM Networking:

                                    I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                                    Well, I cannot think of a reason to require host to guest communication, except that I may want to connect from a guest to the host to update the ISO store I use occasionally.

                                    Ya that's really the only advantage to a full bridge.

                                    And for my lab, colo, and most clients, I do not see that ever being an issue.

                                    But I do have one specific client that will have a stand alone RHEL 7 box running KVM on a remote site. It will be running a single VM. I will have easy access to the VM, but not the host, because of "reasons" that have nothing to do with IT.

                                    Ah ic. I really wish there was an easy way to get ovs installed on RHEL 7/CentOS 7.

                                    1 Reply Last reply Reply Quote 0
                                    • JaredBuschJ
                                      JaredBusch
                                      last edited by

                                      So working, but lots of packet loss for a while.

                                      0_1514491104806_d57c0e5a-bcbf-4512-8d41-507781e19336-image.png

                                      It seems solid now.
                                      0_1514491185933_152af0bb-9c5e-4e27-bc15-f61046d98734-image.png

                                      Nevermind.. while it was trying to communicate out to get the base repo info, the pings failed. Once that timed out, the pings worked. Just tried it a couple times...

                                      1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch @stacksofplates
                                        last edited by

                                        @stacksofplates said in Help me understand KVM Networking:

                                        I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                                        So how do you setup a private connection?

                                        I have no issues with using macvtap on the team.

                                        stacksofplatesS 1 Reply Last reply Reply Quote 0
                                        • stacksofplatesS
                                          stacksofplates @JaredBusch
                                          last edited by

                                          @jaredbusch said in Help me understand KVM Networking:

                                          @stacksofplates said in Help me understand KVM Networking:

                                          I also usually just use macvtap. If I need host to guest communication I just set up a private network for them to communicate on.

                                          So how do you setup a private connection?

                                          I have no issues with using macvtap on the team.

                                          You can just create it in Virt-Manager. I'll jump on my laptop and take a screenshot.

                                          1 Reply Last reply Reply Quote 0
                                          • stacksofplatesS
                                            stacksofplates
                                            last edited by stacksofplates

                                            Just click on your connection and go to edit -> connection details and click on the Virtual Networks tab.

                                            Click the plus

                                            0_1514491907472_createprivate.png

                                            Then run through the wizard.

                                            0_1514491928279_name.png

                                            0_1514491934772_ipv4 settings.png

                                            0_1514491943423_last.png

                                            If you choose NAT instead it will still work but is kind of pointless since you will already have an address through the macvtap.

                                            You can do this through virsh as well. The host uses dnsmasq to configure everything so you can also add reservations and all of the other goodies as well. For reservations you can just add it in after the range line:

                                                <host mac='de:ad:be:ef:ca:fe' name='test-vm' ip='192.168.30.50'/>
                                            

                                            0_1514492370729_virsh.png

                                            1 Reply Last reply Reply Quote 2
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post