UPDATE – Managing Multiple Interfaces with Fedora 21, libvirt, Qemu, NetworkManager

This post is an update to a previous post on using multiple interfaces(Ethernet cards) on the LAN, – utilizing RedHat’s popular virtualization tools – QEMU, KVM, libvirt, and virt-manager.  In this article I will demonstrate with Fedora 21, but this roughly applies to CentOS 7 as well.

I’ve resisted upgrading to recent versions of Fedora/CentOS for a long time.  The main reason is that I hate NetworkManager.  It does to much automatically; I much preferred the old ‘network’ daemon that could easily be manually set.  For instance if I create a Bridge(call it bridge1) interface assigned to my second Ethernet card(eth1) NetworkManager will automatically create a profile for each with automatic startup and DHCP enabled!  I don’t need or want a DHCP lease on either side of a bridged interface!  Among other issues are the creation of duplicate profiles when libvirt restarts.  So NetworkManger reports ‘bridge1’ & ‘bridge1’ in the NM start menu applet.

Ideally libvirt and NetworkManager would work hand in hand because Redhat sponsors both projects…

In this article we will describe the steps to allow you to connect two seperate NIC’s to a switch; assigning one of the NIC’s specifically to guest VM’s.

Goals of this post:

  • Set NetworkManager to ignore bridge and Ethernet device
  • enable systemd version of rc.local boot script to create bridge at boot
  • assign host to specific bridged Ethernet device



How to migrate a QEMU – KVM image to a Physical Machine(PC)

Virtualization and cloud services are great!  Everyone wants to move services to web space, but little is written about migrating to physical hardware.  Even though virtualized environments are ideal for labs(at least from cost and organization stand point).

Open Source QEMU-KVM provides an excellent set of tools through libvirtd/virt-manager.  I use virtualization for test lab environments and creating virtual upgrades for my customers.  The main benefit is that I can test 90% of their Asterisk PBX without touching the production system.

In the past, I used several boxes with removable drive bays.  There are many problems with this setup and I’m sure many of my readers will agree with the conclusion: that test labs can get messy and can hinder work. Other engineers, will frequently need the lab equipment, or hard drives(with important experiments) go missing.

Sometimes test servers get cannibalized for parts when there is an emergency.  Then consider the cost of the hardware and electricity.  Luckily, one Intel i7 with 8G of RAM can easily manage three or four Linux guests.  The conclusion I came too is that virtualization is the most effective way to get around these problems.

My hardware specs:

Fedora 14
8 Gigabytes DDR3
Intel(R) Core(TM) i7 CPU  860  @ 2.80GHz

What you need:

– QEMU-KVM image
– Linux Boot CD or USB stick
– DVD, USB, BD-r or external drive of some kind

This tutorial is to help system administrators migrate server images(created from virt-manager) from the virtual realm to a PC for production use.  I’m assuming that the reader has basic knowledge of Linux, QEMU, KVM, and virt-manager.  Before you begin, test that the image contains necessary drivers for any proprietary hardware.

Goals of this Post:
– Export QEMU-KVM image to a physical machine
– Resize VM Image to take up to fill harddrive space

Written by mattb in: Linux | Tags: , , , ,