1

This is what I want to achieve:

KVM Host:

  • Obtain IP via DHCP
  • ssh connect via hostname (VM-host hostname)
  • Ubuntu Server 14.04 LTS
  • Sitting in a LAN, not reachable via internet
  • Has one physical interface on eth0

Guests:

  • Obtain IP via DHCP
  • ssh connect via hostname (VM-guest hostname)
  • Ubuntu Server 14.04 LTS
  • Direct communication between host/guest OS is not necessary
  • Direct communication between guests is not necessary

I read a lot about this, but the more I read the more possibilities appear. I need a push into the right direction.

There are several methods I did take a look at:

  • NAT (preconfigured by libvirt). I read that NAT is not the best performance-wise, since the traffic needs to be remapped before reaching the guest
  • Bridged networking by editing /etc/network/interfaces like here.

But when I set

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp

I can no longer reach the host (or did I get something wrong?) Or do I connect to the host via the bridge now? And if so, how?

  • Macvlan and Macvtap This seems to be a interesting solution but also the most complicated of them all

Which of these methods is the best to reach the specified environment?

VapoRizer
  • 131
  • You use those /etc/network/interfaces on the HOST not the guest. – Panther Nov 04 '15 at 16:56
  • Thats right. I did this on the host. According to the first answer on the link below, the host(or rahter eth0 from host?) is intended to be unnumbered when set on "manual". Maybe it is possible to configure it different. "dhcp" instead of "manual" does not the trick. http://askubuntu.com/questions/179508/kvm-bridged-network-not-working – VapoRizer Nov 04 '15 at 17:12

1 Answers1

1

My bad, in /etc/network/interfaces of the host I wrote

ifac br0 inet dhcp

instead of

iface br0 inet dhcp

I'm going with the bridge mode, since it comes officially with the kernel. I'll look into Macvlan and Macvtap later, if there are CPU load problems like here.

There is a really detailed pdf presentation about virtual switching which claims "CPU usage by macvtap is 24~29% lower than bridge / Open vSwitch" on page 23

VapoRizer
  • 131