Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Introduction

Google Cloud's Compute Engine uses KVM as the hypervisor. Nuff said in terms of longevity, security and support. The other advantage and reason I settled on KVM is that unlike other hypervisors it works with pretty much any hardware (which I found out the hard way trying to get my old Dell laptop working with other options first). foundational home cloud... based on KVM used by Google Cloud

What is outlined here can be considered foundational home Cloud to gain an under the hoods look at Google Cloud engine.

Setup Server

Setup Ubuntu Server on Dell Laptop laptop (really don't use Dell because it has various challenges... ).

...

Going into device manager you will see something missing, it's the memory driver so load it.

Shutdown again (at this point I think I you then need to set the min (current allocation) and max (maximum allocation) to properly use the vritio memory driver). You might want to watch your actual memory usage to determine best min because ballooning likely (need to check) take resources and you also want to not set yourself up to be over allocated if other systems ballon too. For my needs Win 7 I find it usually stays at 1.6GB, so I allocate 1.6GB - 4GB.

Finally, the default realtek network should work, but to get better performance switch to the virtio network card and repeat.

...

Expose VMs to the Network via Public Bridge

Ubuntu Server

Strange... somehow KVM can setup up a Public Bridge during boot of the VM and this can be manipulate manipulated using VMM (Virtual Machine Manager).

First confirm the name of your active network card.

(to put instructions here)

Using VMM. Turn off you VM if not already off. Load Information window. , choose NIC. Change , change Network source to Host device macvtap. Notice KVM auto generated a unique mac.

Boot and now your VM exists like a real machine on your existing network....

But this is not really a good solution and problematic as I found with Ubuntu Desktop... leading to the real solution which is to use VMM at the higher level and configure a proper bridge.

Finally found the clarity by following instructions at techotopia.com through VMM (not you . Note as you follow the VMM GUI instructions you will find VMM will get disconnected after it executes though and the client hands). It was not clear anywhere, but what you do is,changes. Just reconnect after the changes are done.

Abridged notes...

  • Determine your existing network interface that works, in my case enp2s0.
  • Make a new bridge interface we'll call br0
  • Make enp2s0 slave to br0
  • br0 then is your new primary interface, receiving the host's IP address on your NIC
  • But it also is in bridge mode so VMs choosing to use br0 will get their own IP address against the same network via dhcp

...

... put original file here...

To static config,this

... to pu here ...

Additionally if you want to use a static IP,

Go from this,

Code Block
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp2s0
iface enp2s0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1

To And after using VMM resulting in to configure the bridge it should look like this,

Code Block
languagebash
 This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br1br0
iface br1br0 inet dhcp
   bridge_ports enp2s0
   bridge_stp on
   bridge_fd 0.0

And this to give br1 then you need to manually edit to give br0 the static ip,

Code Block
languagebash
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet static
   address 192.168.0.7
   netmask 255.255.255.0
   gateway 192.168.0.1
   dns-nameservers 192.168.0.1
   bridge_ports enp2s0
   bridge_stp on
   bridge_fd 0.0

If interested, you may want to read more details about bridge networking for virtualization.

...


Ubuntu Desktop

Did not work retrofitting... so this time trying during vm setup before install,

...

Alternative Container Manager and similar to Virtual Machine Manager can also be used for Linux Containers.

This article can help this person... when completed follow-up with a post - https://askubuntu.com/questions/28056/kvm-with-windows-xp