{"id":16959455,"url":"https://github.com/ncrmro/gondola","last_synced_at":"2026-05-17T19:36:25.266Z","repository":{"id":46814449,"uuid":"281768792","full_name":"ncrmro/gondola","owner":"ncrmro","description":"Ansible playbook to set up a emulated Raspberry Pi OS in KVM with minimal hassle.","archived":false,"fork":false,"pushed_at":"2023-01-24T23:24:13.000Z","size":30,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-30T17:48:36.286Z","etag":null,"topics":["ansible","ansible-playbook","arm","armv7","emulation","kvm","kvm-hypervisor","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ncrmro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-22T19:45:27.000Z","updated_at":"2020-12-24T00:38:52.000Z","dependencies_parsed_at":"2023-02-14T02:31:10.568Z","dependency_job_id":null,"html_url":"https://github.com/ncrmro/gondola","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ncrmro/gondola","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncrmro%2Fgondola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncrmro%2Fgondola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncrmro%2Fgondola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncrmro%2Fgondola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncrmro","download_url":"https://codeload.github.com/ncrmro/gondola/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncrmro%2Fgondola/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook","arm","armv7","emulation","kvm","kvm-hypervisor","raspberry-pi"],"created_at":"2024-10-13T22:45:00.027Z","updated_at":"2026-05-17T19:36:25.250Z","avatar_url":"https://github.com/ncrmro.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gondola\n\n## Description\n\nThis project should provide an ansible playbook that provisions a\nemulated raspberry pi virtual machine on the local KVM machine.\n\nA quick over view, this project gets the following files in the table bellow, converts the `.img` file to `.qcow2` (allows us to snapshot guest)\nand puts the files in your libvirt images folder. Then creates the kvm guest and an initial snapshot. From there you can clone that initial image for development related tasks.\n\n| File                                     | Purpose                                                                            |\n| ---------------------------------------- | ---------------------------------------------------------------------------------- |\n| 2020-05-27-raspios-buster-lite-armhf.img | The [image](https://www.raspberrypi.org/downloads/) containng the operating system |\n| kernel-qemu-4.19.50-buster               | The [kernal](\u003chttps://en.wikipedia.org/wiki/Kernel_(operating_system)\u003e)            |\n| versatile-pb-buster.dtb                  | The [device tree blob](https://superuser.com/a/736988)                             |\n\nYou can instead use stretch by uncommenting that section in `./vars.yml`, buster has issues installing docker ATM.\n\n## Installation\n\nMake sure you have `libvirt-dev` and `qemu-system-arm` installed as well.\n\n`pip install -r requirements.txt`\n\n## Usage\n\n`sh main.sh`\n\nAt this point you should be able to ping your pi\n\n`ping raspberrypi.local`\n\nYou might drop into the guest and enable openssh-server username is `pi` password is `raspberry`\n\nExpand the disk\n`sudo raspi-config --expand-rootfs`\n\nEnable openssh-server\n`sudo raspi-config`\n\nThen enable the openssh-server\n\nAnd then from your host machine\n\n`ssh-copy-id -i ~/.ssh/id_ed25519.pub pi@raspberrypi.local`\n\nNow you should be able ssh in.\n\n`ssh pi@raspberrypi.local`\n\nBest to take a snapshot while we are here.\n\n`virsh snapshot-create-as --domain pi __name \"host_ssh_key_added_to_pi_user\"`\n\nDo any more processing to the base image that you would like, idealy before you deploy these images in the wild you add\nmaybe `ufw` and `fail2ban`\n\nNow lets create your actual image you'll use for which ever project your working on.\n\nPower off your machine if it isn't already.\n\nNow lets clone, change `my_dev_pi` to what ever you need it to be.\n\n`virt-clone --original pi --auto-clone -n my_dev_pi`\n\n### Once your ready to run your image on physical hardware.\nShut  down the vm if it is started.\n\n`virsh destroy pi`\n\nConvert .qcow2 back to .img\n\n`qemu-img convert /var/lib/libvirt/images/2020-05-27-raspios-buster-lite-armhf.qcow2 -O raw ~/Downloads/disk.img`\n\n## Roadmap\n\n- [x] Ansible Setup with Connection to Specified Host - Hello World\n  - [x] Make sure KVM NAT network is accessible with DNS\n- [x] Download Raspberry Pi Image\n- [x] Download the necessary kernals\n- [x] Asnible Jinja Templete Libvirt Guest XML\n- [x] Initial provision of SSH key and any required packages\n  - [ ] Clone the VM this guest can be developed against.\n  - [ ] Dump Image to Be burned to USB\n- [ ] Develop Image (our Firmware)\n- [ ] Create a Firmware Release (qcow2 back to bootable image)\n\n## Resizing Disk Ver2\n\nThe stretch image for some reason wont expand using the\n`sudo raspi-config --expand-rootfs` the instructions below are from [this](https://raspberry-projects.com/pi/pi-operating-systems/raspbian/troubleshooting/expand-filesystem-issues)\narticle.\n\nInstead open the disk in fsdisk\n\n`sudo fdisk /dev/vda`\n\nThen hit the following\n\n```\nPress 'd' \u003e Enter\n\nPress '2' \u003e Enter\n\nNow re-create it:\n\nPress 'n' \u003e Enter\n\nPress 'p' \u003e Enter\n\nPress '2' \u003e Enter\n\nFor the first sector take the start number of /dev/vda2 for the last sector use the provided value which should be the\nfull disk size\n\nsudo shutdown -r now\n\nsudo resize2fs /dev/vda\n```\n\n## Credits\n\n- [Using QEMU to emulate a Raspberry Pi](https://blog.agchapman.com/using-qemu-to-emulate-a-raspberry-pi/)\n- [qemu-rpi-kernel](https://github.com/dhruvvyas90/qemu-rpi-kernel)\n- My Blog post about this project [here](https://ncrmro.com/posts/gondola-ansible-playbook-for-emulating-raspberry-pi-os-with-kvm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncrmro%2Fgondola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncrmro%2Fgondola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncrmro%2Fgondola/lists"}