DEV Community

Cover image for KVM/QEMU Raspberry Pi ARM VM
corusm
corusm

Posted on • Edited on

5 1

KVM/QEMU Raspberry Pi ARM VM

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
Enter fullscreen mode Exit fullscreen mode

Ubuntu

sudo apt-get install -y qemu-system-arm
Enter fullscreen mode Exit fullscreen mode

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 \
view raw start.sh hosted with ❤ by GitHub

Download Rasbian Jessie 2017-07-05

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

Download Qemu Kernel Jessie

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

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
Enter fullscreen mode Exit fullscreen mode

Start VM

./start.sh
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Default Login

User: pi
Password: raspberry
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
julianyaman profile image
Julian Yaman

Hello sir, you defaul passwort is not good.

default = raspberry

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay