This guide assumes you have ubuntu machine in my case I am using a virtual machine for the setup.
Go to the Raspbian images page and download the appropriate zip file.
Extract the downloaded zip file to obtain the .img file.
Visit the qemu-rpi-kernel repository and download the kernel-qemu-4.4.34-jessie file.
Check all your files with the ls command in your terminal.
Run the following command, making sure to replace /Documents/qmu_vms/ with the path to where your files are located:
qemu-system-arm -kernel /Documents/qmu_vms/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda /Documents/qmu_vms/2017-04-10-raspbian-jessie.img -nic user,hostfwd=tcp::5022-:22 -no-rebootNote: Write your own path where necessary.
This will open a Raspbian QEMU window.
Open a terminal in QEMU and start the SSH service:
sudo service ssh startOpen a new tab in your Ubuntu terminal and connect via SSH:
ssh pi@127.0.0.1 -p 5022The default password is raspberry.
You are now logged into your QEMU virtual machine.



