Setting up KVM on Raspberry Pi 3 using a 64bit openSUSE Pi3 Leap 42.2 xfce image
This story begins how most stories begin, browsing github issues and tech forums to hope that someone is going or has gone through the process of getting a working kvm virtualization on the Raspberry Pi 3. For me, things started looking good after I stumbled into this particular issues thread on github. That eventually led me to this post about the release of openSUSE Pi3 Leap 42.2 64bit image for the raspberry pi. If you are like me and have been searching le interwebs for this exact product this probably looked too good to be true but lo and behold here we are.
openSUSE leap 42.2 with 64-bit image for raspberry PI [Full Guide]
a short time ago were announced 64-bit images from SUSE Linux Enterprise Server (SLES) for raspberry PI . Well, there's…
Without further ado, this is what I did to get kvm setup on my Raspberry Pi 3 model B:
# Download the opensuse 64bit image for raspberry pi 3
1. Download the opensuse Leap 42.2 xfce image from the HCL website here. This is the only 64 bit aarch image for the raspberry pi 3 right now…I tried about everything from ubuntu snappy to centos7 to le fedora but with no cigar. This OS image comes with the kvm kernel module automatically installed. NOTE: LVDS display (e.g. raspberry pi 7 inch display) won’t work with this image. If you don’t have an HDMI capable display close by, don’t worry because I manage to get a remote display working through remote desktop (xrdp) by leveraging this guide — I explain this later.
HCL:Raspberry Pi3 - openSUSE
The upstream Linux graphics driver for the Raspberry Pi has problems with a few monitors. The same applies to the 7…
Ubuntu 14.04 - How to install xrdp in Ubuntu 14.04
Hello World, Ubuntu 14.04 has been released on April 17th 2014 and we already released the traditional post about how…
# Preparing the SD card.
2. I used Etcher to flash the 64bit xfce image to the SD card.
# Installing the image
3.1 Insert the SD card with the openSUSE image into your board.
3.2 Connect the board to your PC via HDMI or serial port (optional, but helpful for debugging; USB-TTL serial cable needed). I didn’t use this initially but I strongly recommend it so you can get insight into what’s going on asap… I kinda flew blind and crossed my fingers a lot when I got to the images without display support. Any HDMI version 1.3a and below are guaranteed to work. The serial port details should be either serial0 at 115200 or ttyAMA0 at 115200.
3.3 For an easy first connection, I recommend using Ethernet but if you’d like you can setup wifi through the serial port using by leveraging this guide.
Setting up Wifi with the Command Line | Adafruit's Raspberry Pi Lesson 3. Network Setup | Adafruit…
Setting up WiFi in Occidentalis, is also pretty straight forward. You just need to add the name of your wireless…
3.4 Power on the board and walk through the boot process. If you are flying blind, I timed this process on my board and it took 5 minutes.
3.4.1 After this process is finished you can connect to the board using ssh if know what ip the board is running on. You can also login through the serial interface. The default login is root:linux, works on serial console, via ssh, or GUI. I connected using ssh to my raspberry pi running at 192.168.1.86.
3.5 Update the package manager by running
sudo zypper update
If you have network issues related to ipv6 then edit the /proc/sys/net/ipv6/conf/all/disable_ipv6 file and change the value from 0 to 1.
# Installing xrdp to enable GUI through Remote Desktop
Part of the reason I chose the xfce image is so that I can easily setup remote desktop on my pi.
4.1 Open a terminal and run
sudo zypper install xrdp
echo xfce4-session >~/.xsession
4.2 Restart the xrdp session.
sudo service xrdp restart
NB: You will have to do this everytime you reboot the board.
4.3 You can now use remote desktop on windows or Mac to connect to your pi.
Microsoft Remote Desktop on the Mac App Store
Read reviews, compare customer ratings, see screenshots, and learn more about Microsoft Remote Desktop. Download…
After connecting you should then see a screen that looks like this
# Installing libvirt and virt-manager
Like I said, this image already has kvm kernel modules enabled automatically. From here we will just install libvirt and virt-manager. Virt-manager makes it easy to create and manager guest virtual machines by providing a graphical interface.
Virtual Machine Manager Home
The virt-manager application is a desktop user interface for managing virtual machines through libvirt. It primarily…
5.1 Install qemu uefi support, libvirt, and virt-manager by running
sudo zypper install qemu-uefi-aarch64 libvirt virt-manager
5.2 Restart the libvirtd service by running
sudo service libvirtd restart
NB: again, you will have to do this everytime you reboot the board.
5.3 type virt-manager on the terminal to bring up the virt-manager
5.4 Double click the QEMU/KVM selection to connect. If you see something that says that libvirtd daemon is not running then you need to restart the libvirtd service like I did above and try again. if not you should see the Not Connected status go away.
With that we have officially connect KVM to run on pi3. From here you can create a new virtual machine by going to File>New Virtual Machine. Doing that should produce a pop-up like the image at the title of this section. Follow the instructions and configure your VMs to run with KVM!