How to configure networking for virtual SuSE hosted on SuSE?

I have been trying to get virtualization clients to see the host’s enternet devices. I tried following SEL and IBM documentation, but neither one resulted in any success.

I have a wireless ethernet controller and a copper ethernet controller. I read that virtual servers don’t like wireless controllers, so I’ve been trying to get my copper controller to work.

Can someone tell me what I should see from /sbin/ifconfig -a' and /sbin/brctl show’? I want to know what I should see on both the client hand the host. I have been using both Xen and KVM without success.

I can’t figure out a way to copy from the client window, but it only shows the lo and eth0 interfaces, and the eth0 has no IP configuration and it’s module is viertio_net. Here’s what I see on my physical host:

vmhost:/etc # brctl show
bridge name bridge id STP enabled interfaces
br0 8000.e840f25fafc7 no enp4s0

vmhost:/etc # ifconfig -a
br0 Link encap:Ethernet HWaddr E8:40:F2:5F:AF:C7
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6583 errors:0 dropped:0 overruns:0 frame:0
TX packets:5851 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4546632 (4.3 Mb) TX bytes:954437 (932.0 Kb)

enp4s0 Link encap:Ethernet HWaddr E8:40:F2:5F:AF:C7
inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9545 errors:0 dropped:0 overruns:0 frame:0
TX packets:7633 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6668257 (6.3 Mb) TX bytes:1202946 (1.1 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:975581 errors:0 dropped:0 overruns:0 frame:0
TX packets:975581 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5669665719 (5407.0 Mb) TX bytes:5669665719 (5407.0 Mb)

vnet0 Link encap:Ethernet HWaddr FE:54:00:F1:3A:0C
inet6 addr: fe80::fc54:ff:fef1:3a0c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:9660 (9.4 Kb) TX bytes:73896 (72.1 Kb)

wlp3s0 Link encap:Ethernet HWaddr 9C:B7:0D:EF:D4:04
inet6 addr: fe80::9eb7:dff:feef:d404/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:31894 (31.1 Kb)

wlp3s0:av Link encap:Ethernet HWaddr 9C:B7:0D:EF:D4:04
inet addr:169.254.8.3 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

On Sat 26 Jul 2014 04:36:01 AM CDT, hattons wrote:

I have been trying to get virtualization clients to see the host’s
enternet devices. I tried following SEL and IBM documentation, but
neither one resulted in any success.

I have a wireless ethernet controller and a copper ethernet controller.
I read that virtual servers don’t like wireless controllers, so I’ve
been trying to get my copper controller to work.

Can someone tell me what I should see from /sbin/ifconfig -a' and /sbin/brctl show’? I want to know what I should see on both the client
hand the host. I have been using both Xen and KVM without success.

I can’t figure out a way to copy from the client window, but it only
shows the lo and eth0 interfaces, and the eth0 has no IP configuration
and it’s module is viertio_net. Here’s what I see on my physical host:

vmhost:/etc # brctl show
bridge name bridge id STP enabled interfaces
br0 8000.e840f25fafc7 no enp4s0

vmhost:/etc # ifconfig -a
br0 Link encap:Ethernet HWaddr E8:40:F2:5F:AF:C7
inet addr:192.168.1.105 Bcast:192.168.1.255
Mask:255.255.255.0
inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6583 errors:0 dropped:0 overruns:0 frame:0
TX packets:5851 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4546632 (4.3 Mb) TX bytes:954437 (932.0 Kb)

enp4s0 Link encap:Ethernet HWaddr E8:40:F2:5F:AF:C7
inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9545 errors:0 dropped:0 overruns:0 frame:0
TX packets:7633 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6668257 (6.3 Mb) TX bytes:1202946 (1.1 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:975581 errors:0 dropped:0 overruns:0 frame:0
TX packets:975581 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5669665719 (5407.0 Mb) TX bytes:5669665719 (5407.0
Mb)

vnet0 Link encap:Ethernet HWaddr FE:54:00:F1:3A:0C
inet6 addr: fe80::fc54:ff:fef1:3a0c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:9660 (9.4 Kb) TX bytes:73896 (72.1 Kb)

wlp3s0 Link encap:Ethernet HWaddr 9C:B7:0D:EF:D4:04
inet6 addr: fe80::9eb7:dff:feef:d404/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:31894 (31.1 Kb)

wlp3s0:av Link encap:Ethernet HWaddr 9C:B7:0D:EF:D4:04
inet addr:169.254.8.3 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

Hi
Use YaST network settings and create a new interface, in the dropdown
select br0 then select your ethernet interface to use.

I use virt-manager to bind the interface to my virtual machine ethernet.


brctl show

bridge name	bridge id		STP enabled
interfaces br0		8000.d48564aXXXXe no		eth0
vnet0

ifconfig

br0       Link encap:Ethernet  HWaddr XX:XX:64:A9:65:3E
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:3054 errors:0 dropped:600 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:209743 (204.8 Kb)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr XX:85:64:A9:XX:3E
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:22614 errors:0 dropped:0 overruns:0 frame:0
TX packets:2977 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8402673 (8.0 Mb)  TX bytes:1332982 (1.2 Mb)
Interrupt:42 Base address:0xa000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:251 errors:0 dropped:0 overruns:0 frame:0
TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39360 (38.4 Kb)  TX bytes:39360 (38.4 Kb)

vnet0     Link encap:Ethernet  HWaddr XX:X4:00:2E:X3:FC
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:2582 errors:0 dropped:0 overruns:0 frame:0
TX packets:6633 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1306952 (1.2 Mb)  TX bytes:2979704 (2.8 Mb)

wlan0     Link encap:Ethernet  HWaddr XX:46:19:57:XX:F2
inet addr:192.168.10.XXX  Bcast:192.168.XXX.255
Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500
Metric:1 RX packets:19664 errors:0 dropped:1042 overruns:0 frame:0
TX packets:198 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5750819 (5.4 Mb)  TX bytes:38264 (37.3 Kb)


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

That’s a lot of hand-typing if you don’t know how to copy out of a console window :slight_smile:

The keystroke combination is to add SHFT to the standard keystroke combo, so for example
Copy = CTL+SHFT+C
Paste = CTL+SHFT+V

Oftentimes, if you know you will want the output to screen (STDOUT), you can pipe the output to a file with the appropriate command, so for example

Instead of

ip addr

You can write the ip addr results to file

ip addr > networkinfo.text

OK,
Now to your actual problem…

Unlike Malcolm’s recommendation which is to use YAST to create your Linux Bridge Device (br0)
if you’re already using libvirt to create your LBD which are typically named “virbr” instead of “br”

I recommend you continue to create your LBD using vm manager or by command line. You’ll find that creating the virtual networks with various possible options like DHCP, scope, more should be much easier. Otherwise, there should not be any difference how you create LBD… whether using YAST, vm manager, libvirt console commands, brctl commands, etc.

Once you’ve created a (or more than one) LBD by whatever means, it should be immediately visible and manageable (if desired) using the brctl command. No extra steps should be required.

You only need then to configure a Guest’s properties to point to, and use the LBD, and it can be used simultaneously by any number of Guests and also using any virtualization technology. So, for instance you could have 3 Guests on the same machine all using the same LBD so that they can communicate with each other. And, the three guests can be using different virtualization like KVM/QEMU, LXC, VMware, VBox, etc. although I don’t recommend running more than one paravirtualization technology simultaneously for performance reasons.

TSU

Thanks. I will try that when I get a new VM running.

Ahm, think about that for a spell. How do I get to the file if the networking is broken?

Here’s one part I don’t get. How should my ethernet controller be configured prior to creating the virtual bridge? YaST complained when I tried it with the NIC configured. I created the bridge and told it to get it’s IP configuration from DHCP. I then selected the unconfigured NIC, and that works as far as getting my native OS connected to the Internet. My system now looks like this:

# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.e840f25fafc7       no              enp4s0

# ifconfig 
br0       Link encap:Ethernet  HWaddr E8:40:F2:5F:AF:C7  
          inet addr:192.168.1.105  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3190695 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1625783 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4755047097 (4534.7 Mb)  TX bytes:110172586 (105.0 Mb)

enp4s0    Link encap:Ethernet  HWaddr E8:40:F2:5F:AF:C7  
          inet6 addr: fe80::ea40:f2ff:fe5f:afc7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3191232 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1625819 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4799753197 (4577.4 Mb)  TX bytes:110188223 (105.0 Mb)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:582512 errors:0 dropped:0 overruns:0 frame:0
          TX packets:582512 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6617602710 (6311.0 Mb)  TX bytes:6617602710 (6311.0 Mb)

I believe the only hypervisors distributed with OS13.1 are KVM and Xen. I’m not sure which one is best for production. Xen required me to select a different boot option on the splasy screen, and my vidoe driver didn’t like that, so for now I’ll be working with KVM.

Hi
You need to leave the ethernet and bridge unconfigured, see my output. The vm will sort out the ip address.

Sounds like you discovered on your own Malcolm’s recommendation for when you want the Guest to be in bridging mode (visible on the physical network).

Actually, you have many choices when deciding on a virtualization technology on Linux…

**Xen **and KVM are probably the best known that are installed on Linux. And, as you’ve discovered exclusive of special considerations (like if you intend to migrate Guests to AWS you’d want to implement Xen), IMO KVM probably will give you fewer problems (at least that’s my experience).

Other possible virt technologies(the list is very incomplete)
QEMU - Full virtualization instead of paravirtualization. At least for now. There is an effort to merge KVM and QEMU where eventually they will become one.
**LXC **- If you don’t need to support non-Linux, this may be the best choice. Zero overhead, instant start/stop, it’s a kind of “super chroot”
OpenVZ - Similar to LXC
User Mode Linux - Similar to LXC and OpenVZ but IMO less stable. Lots of features you won’t find elsewhere is the tradeoff. Many features born in UML eventually make their way into other virtualization.
**Virtualbox **(The community version) - The proprietary version is also free, but you download and install from Oracle
**VMware **(various) - ESXi and Player are free. Others cost and can be expensive, but VMware is probably the gold standard for stability, features, performance and support for all modern OS.

The above list are probably the most important and widely used (did I leave any off the list?) running on a Linux host. In fact, several like LXC, OpenVZ and User Mode Linux access the Linux Kernel similarly and even launch Guests nearly the same. None of the above is necessarily better than another but their featuresets, support and performance make one preferable over another in different scenarios.

There are also another dozen or so virtualization technologies that still exist but are less used for various reasons.

IMO,
TSU

OK, I finally got things working. What I had started with was CentOS because employers like to list that on Job requirements. I’m not sure what was going on with that. I had to go through the install a few times before I got it to work. It kept showing me the only available ethernet device as eth0, but that didn’t work. The last time it displayed ens3 which looked like the right animal. For some reason OS13 has two icons in YaST for creating virtual machines. One of them works, and the other crashes when I confirm the option to create a resource pool.

The GUI launched by virt-manager also crashes on the same prompt. It’s a GTK app, so that isn’t surprising.

The host OS now shows this:

# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.e840f25fafc7       no              enp4s0
                                                        vnet0
                                                        vnet1

The guest OSes don’t show bridges.

Thanks for the guidance on this.

IMO you should inspect the configurations for vnet0 and vnet1, one of them probably should be removed from br0
Typically (but not always) you should have a physical and only one virtual network associated with the bridge device… Unless someone can describe a scenario I haven’t thought of.

Yes, <within> the Guest networking typically should be configured to connect to the default wired interface (regardless what is happening in the real world). That “wired interface” would then be managed outside the Guest on the Host to connect to your choice Linux Bridge Device, and different bridge devices would be associated with different network connections. This way, no matter what virtual (or physical) network you connect to, it’s done by simply pointing to a different bridge device but within the Guest nothing changes (unless it’s something like DHCP yes/no).

As you describe you should not see a Linux Bridge Device within the guest although many years ago that was how networking was configured in VMware (pointing to a Bridge device both in the Guest and outside the Guest in the Guest properties).

TSU

BTW - re my suggestion to pipe output to file.

Even if you don’t have networking, you might be able to copy/move that file to another machine a number of non-networking ways,
eg

  • copy/move to removable storage like a USB or other external direct-attached storage. Once copied, detach and attach to another machine to transfer or read the file.

  • Many virtualization technologies (including KVM, VMware and Virtualbox) support shared file storage between Guests and between the Guest and the Host, the protocol used is called Plan9. If you’re using libvirt(VM Manager), this is my writeup on how to configure
    http://en.opensuse.org/User:Tsu2/virtfs#Overview

BTW - Save yourself some bootup time… Any/all paravirtualized Guests including KVM need to do this blacklist, either follow the instructions in the script or if you’re applying against many Guests I run the script once in every Guest.
https://github.com/putztzu/public_scripts/blob/gh-pages/blacklist_smb.sh

Also,
If you prefer to view the entire Grub menu entry on bootup, the standard Grub Menu is very narrow so you can’t see the entire description. The scripts I’ve written for all recent (up to even 13.2 currently) openSUSE fixes this so you can see the entire entry
http://en.opensuse.org/User:Tsu2/12.3/Modified_GRUB_Menu

Enjoy!
TSU

Another tidbit if you’re running CentOS Guests on your openSUSE…

One of the nice things the openSUSE Developers did is to make cloning your Guests really simple to do, then launch with a minimal of effort. You only need to change the machine name (usually in YAST) and that’s it.

If you have to support CentOS Guests, like many other OS it can be a real headache to clone and re-launch.

Very much like openSUSE was… 'way back up to 11.3?
When you clone a Guest, the new Guest will have screwed up networking because it will create a new network interface without removing the old. The result is nothing works.

Resolution:
From within the Guest

  • Run a command that displays the current network interfaces (ifconfig and ip addr are fine, other commands also exist like “ls /sys/class/net”)
  • open the following file for editing (the following command suggests vim)
vi /etc/udev/rules.d/70-persistent-net.rules
  • Inspecting the contents of the file just opened, you will find two interfaces described, but neither will work… The first interface is configured but with an invalid MAC address. The second interface has a valid MAC address but cannot be configured. So the solution? Copy the valid MAC address into the first interface, then remove the second interface altogether, leaving only the first interface now with a configurable interface with a valid MAC address. Save.
  • You’re not done! Now, you need to edit the network interface file which most people are familiar with
vi /etc/sysconfig/network/network-scripts/ifcfg-eth0
  • You’ll find eth0 configured with the invalid MAC address. Change to the valid MAC address you configured in the first file.
  • Although not related to the above, if you haven’t done so already change the machine’s name so it’s unique
vi /etc/sysconfig/network

Have verified the above is still required even with the most recent version of CentOS 7 released a few weeks ago.

Now, aren’t you glad all of the above except for the last step doesn’t have to be done in openSUSE? It’s all fixed for you automatically.

TSU