Setting up Virtual Machine Manager to work with the KVM hypervisor

I want to use the Virtual Machine Manager application in openSUSE to manage my virtual machines and networks. Before that, I needed to create some areas on the hard disk to store information used by the hypervisor as follows. From the command line in my home directory I typed:

mkdir ISO
mkdir vmachines

This created two directories, one (ISO) for storing bootable images used to install virtual machines and the other (vmachines) to hold the virtual hard disks used by those machines. Now that’s done, I can launch the VMM application from ‘System’ -> ‘Virtual Machine Manager’

‘Front Page’ of Virtual Machine Manager

Double clicking on ‘QEMU/KVM’ promped me to input my root password and connected me to the hypervisor. Then, right clicking on ‘QEMU/KVM’ allowed me to select ‘Details’ which then gave me the following information pane about my hypervisor.

Basic performance details about the hypervisor. Options for this pane can be changed by clicking on ‘File’ near the top-left of the window

I first needed to tell the hypervisor where I was going to put bootable disk images for it to use. Clicking on the ‘Storage’ tab produced this window:

Click on the blue cross at the very bottom left of this window to add a new storage pool

Call the new storage pool ‘ISO’

Naming the new ISO sotrage pool

Then point to the newly created ISO directory created earlier.

Browse to ISO directory created earlier

Next, I created another new storage pool, but this time called it ‘VMachines’ and linked it to the ‘vmachines’ directory created earlier. Now my storage pools look like this:

I now have three storage pools. The ‘default ‘ pool will be unused, but I will put bootable image files in ISO and store virtual hard disks in VMachines

Finally, I will go and fetch a copy of RouterOS for experimenting with Mikrotik routers. The file needed is on the Mikrotik download page. It is possible to fetch the file into the correct location on the hard disk via the command line as follows:

cd ~/ISO
wget https://download2.mikrotik.com/routeros/6.39.1/mikrotik-6.39.1.iso

I could now add that ISO to the storage pool by clicking on the swirly arrow icon which made VMM re-read the contents of the ‘ISO’ storage pool allowing it to find the newly downloaded router software image.

Clicking on the swirly arrow icon has added the mikrotik ‘volume’ to the ISO storage pool. That makes it available to the hypervisor for installing a virtual router

Next time I will install the Mikrotik router as well as create some virtual networks for it to route between.

Installing KVM-based virtualisation on openSuse

Recently I was speaking to a friend about Mikrotik routers and he mentioned that you could download a copy of their RouterOS software to experiment with. I hatched a plan to model a small network with such a router at its core and see what can be done with it in terms of monitoring using SNMP-based tools.

First, I would need to set up a fresh virtualisation platform to play with. I plopped a spare hard drive in to my gaming rig and installed openSUSE LEAP 42.2 on to it. That’s the easy bit of course, but I thought it would be interesting to look in more detail at setting up virtualisation using KVM as the hypervisor and some of the issues I encountered.

The ‘Yast ‘ application has a very useful option for installing a hypervisor. Here’s what it looks like:

Click here to begin configuring a hypervisor

Clicking on this item then gave me an option to choose which hypervisor:

Make sure to tick both KVM related boxes

Part of the installation process includes offering to set up a network ‘bridge’. My PC has one physical network device, ‘eth0’ and it has a static IP address (192.168.1.101) on my house network. The bridge will appear as ‘br0’ and will allow my virtual machines to access the house network using IP addresses in the same range as my other computers (i.e. 192.168.1.x)

Saying ‘yes’ to this option creates the ‘default’ virtual network attached to ‘br0’

 

Let’s check that the network has been created by using the ‘ip’ command line tool to see what the state of my network is…

The IP address has moved from ‘eth0’ to ‘br0’ as expected

Ah, but there’s a problem… when I booted up the computer a little while later, I had no network connection. For some reason the routing table had become confused. The IP address was linked to the bridge ‘br0’ but the default gateway was linked to the original ethernet adapter ‘eth0’. This is easy to fix in Yast under ‘System’ -> ‘Network Settings’. Find the entry on routing and change the device from ‘eth0’ to ‘br0’. Fixed!

Use the dropdown to select the correct interface – br0

In another post I will look at setting up ‘Virtual Machine manager’ and install a copy of RouterOS to play with.

Lambourn Vintage Machinery Society Show 2017

David M0ICZ invited me to this year’s Lambourn Vintage Machinery Society 2017 show. Part agricultural show, part auto jumble and part vintage vehicle and machinery exhibition, it was a fascinating day out. I was particularly keen to go, as David had been working very hard in restoring his 1941 Austin K2 van so that he could display it.

Austin K2 front view
1941 Austin K2, proud to be on display at Lambourn in May 2017
K2 information board
Austin K2 information board
K2 Offside
Another view of the K2
K2 rear view
K2 Rear view

Another item that will always get my attention at these sort of events is the static engine. Little Lister and Petter engines that pop and burble away happily, pumping water or generating electricity are fascinating. Lambourn had a very good selection this year – here are just some…

Idling engine
Small static engine just idling
red pump
Engine driving a very nice red pump
Lister pump set
A combination Lister engine and pump set

There are always some rarities and oddities at these shows. The rare…

M3 half track
US World war two M3 half track

…and the odd!

raleigh moped
Raleigh moped-shopping-bike-thing