DEV Community

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

Posted on

1

KVM/QEMU Raspberry Pi ARM VM

This project contains a fully configured Raspbian JessieVM.

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

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

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay