dev::corusm/home//contact/

alt text

KVM/QEMU Raspberry Pi ARM VM

05. February 2020

This project contains a fully configured Raspbian Jessie VM.

Install QEMU

For the setup you need the qemu-system-arm package. Arch

pacman -S qemu-arch-extra

Ubuntu

sudo apt-get install -y qemu-system-arm

Download Content

Download all following content in one Folder. Create start.sh file

#!/bin/bash
sudo qemu-system-arm \
-kernel ./kernel-qemu-4.4.34-jessie \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-hda raspbian-jessie.qcow \
-vga std \
-cpu arm1176 -m 256 \
-M versatilepb \
-no-reboot \
-serial stdio \
-net nic \
-net user,hostfwd=::1234-:22 \

Download Rasbian Jessie 2017-07-05

wget https://downloads.raspberrypi.org/raspbian/images/raspbian-2017-07-05/2017-07-05-raspbian-jessie.zip

Download Qemu Kernel Jessie

wget https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.34-jessie

Convert iso-image to qcow-image

  1. Create QCOW image from ISO.
  2. Resize the QCOW image.
qemu-img convert -f raw -O qcow2 2017-07-05-raspbian-jessie.img raspbian-jessie.qcow
qemu-img resize raspbian-jessie.qcow +6G

Start VM

./start.sh

SSH into VM

For Using SSH you first need to enable ssh in the raspi-config.

  1. Open the raspberry pi vm
  2. Run sudo raspi-config
  3. Goto: Interfacing Options > SSH > YES
ssh pi@localhost -p 1234

Default Login

User: pi
        Password: raspbian

You're done!❤️