{"id":17436119,"url":"https://github.com/jnsgruk/firecracker-ubuntu","last_synced_at":"2025-08-15T21:37:04.713Z","repository":{"id":114024238,"uuid":"574686952","full_name":"jnsgruk/firecracker-ubuntu","owner":"jnsgruk","description":"🚀 Use Firecracker and helpings of bash to boot Ubuntu virtual machines very fast 🔥","archived":false,"fork":false,"pushed_at":"2023-07-15T18:57:04.000Z","size":1072,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T03:55:43.462Z","etag":null,"topics":["automation","bash","cloud-images","cloud-init","dnsmasq","docker-image","firecracker","firecracker-microvms","kernel","microvm","rootfs","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnsgruk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-05T21:29:13.000Z","updated_at":"2025-04-12T11:38:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"35455ff8-f137-4fe8-aaf3-9251c9e6c62d","html_url":"https://github.com/jnsgruk/firecracker-ubuntu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jnsgruk/firecracker-ubuntu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnsgruk%2Ffirecracker-ubuntu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnsgruk%2Ffirecracker-ubuntu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnsgruk%2Ffirecracker-ubuntu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnsgruk%2Ffirecracker-ubuntu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnsgruk","download_url":"https://codeload.github.com/jnsgruk/firecracker-ubuntu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnsgruk%2Ffirecracker-ubuntu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270631906,"owners_count":24619384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","bash","cloud-images","cloud-init","dnsmasq","docker-image","firecracker","firecracker-microvms","kernel","microvm","rootfs","ubuntu"],"created_at":"2024-10-17T10:03:03.237Z","updated_at":"2025-08-15T21:37:04.656Z","avatar_url":"https://github.com/jnsgruk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embr\n\nThe purpose of this project was to explore running Ubuntu with [Firecracker] as a general purpose\ndevelopment machine. This is obviously not what Firecracker was developed for, but it was an\nopportunity to learn a little about it!\n\nAt present, `embr` can download and start Ubuntu cloud images using firecracker, with support\nfor supplying a cloud-init file to customise the virtual machine. It relies upon [dnsmasq] to\ndynamically address the VM it creates.\n\nI took a lot of influence from [ubuntu-firecracker] by [@bkleiner], and this [blog] from\n[@ahachete] in the making of this project.\n\nUsing this approach, I was able to deploy the [Canonical Observability Stack] with [Juju] on\n[MicroK8s] inside a Firecracker VM:\n\n![COS Lite on MicroK8s on Firecracker](.github/images/screenshot.png)\n\n## Prerequisites\n\nBefore you can use or test this project, you'll need the following installed on your machine:\n\n- [dnsmasq]\n- [firecracker]\n- [jq]\n- [yq]\n\n## Quick start\n\nYou can start the project on a clean machine with `./embr launch`.\n\nThis will do the following:\n\n- Download and process the relevant Ubuntu cloud image (latest LTS by default)\n- Create a network bridge device\n- Start `dnsmasq` on that bridge\n- Create two tap network interfaces for the VM (one for the metadata service, one for normal use)\n- Create a folder structure for a VM, containing kernel, disk, initrd and a definition file\n- Start firecracker and configure the VM over it's HTTP API\n- Start the VM\n\nWith no arguments, `embr` will create a VM with 8 CPUs, 16GB RAM and a 20GB disk.\n\nOnce you've run `./embr launch`, you'll get instructions on how to connect to your VM.\n\nTo cleanup your machine, run `./embr clean`. Note that this will, kill started processes, remove\nany network interfaces and delete the VM.\n\n## Customising your machine\n\nThe `embr launch` command takes a number of arguments such that you can customise the CPUS, memory,\ndisk and series that is used:\n\n```\n$ ./embr launch --help\nembr is a tool for creating and launching Ubuntu virtual machines with Firecracker.\n\nUSAGE:\n        embr launch [OPTIONS]\n\nOPTIONS:\n        -n, --name \u003cname\u003e\n                Hostname of the virtual machine to create.\n                Default: dev\n\n        -c, --cpus \u003ccpus\u003e\n                Number of virtual CPUs to assign to the VM\n                Default: 8\n\n        -m, --memory \u003cmem\u003e\n                Amount of memory in GB to assign to the VM.\n                Default: 16\n\n        -d, --disk \u003cdisk\u003e\n                Size of disk for the VM in GB.\n                Default: 20\n\n        -f, --cloud-init \u003cfile\u003e\n                Filename of the cloud-init user data file to use for provisioning.\n                Default: userdata.yaml\n\n        -s, --series \u003cseries\u003e\n                The Ubuntu series codename to use. E.g. xenial, bionic, focal, jammy\n                Default: jammy\n\n        -h, --help\n                Display this help message.\n```\n\n## TODO\n\n- [ ] Resume VM and make sure existing interfaces are present\n- [ ] Multiple VM support\n  - [x] Store VMs in separate directories\n  - [ ] Start / stop VMs independently\n  - [ ] Status command to show running, IP, etc.\n- [ ] Stop being a maniac and write this in Go\n\n### Done\n\n- [x] Better command line arg experience\n- [x] Output an accurate message with connection instructions on boot\n- [x] Figure out how to run DHCP on a tap interface\n- [x] Enable the use of standard Ubuntu cloud images\n- [x] Enable cloud-init support\n- [x] Add support for customising kernel and rootfs build\n\n[@ahachete]: https://twitter.com/ahachete/\n[@bkleiner]: https://github.com/bkleiner\n[blog]: https://ongres.com/blog/automation-to-run-vms-based-on-vanilla-cloud-images-on-firecracker/\n[canonical observability stack]: https://charmhub.io/topics/canonical-observability-stack\n[config]: ./default.conf\n[dnsmasq]: https://thekelleys.org.uk/dnsmasq/doc.html\n[docker]: https://docs.docker.com/desktop/install/linux-install/\n[firecracker]: https://github.com/firecracker-microvm/firecracker\n[jq]: https://stedolan.github.io/jq/\n[juju]: https://juju.is\n[microk8s]: https://microk8s.io\n[ubuntu-firecracker]: https://github.com/bkleiner/ubuntu-firecracker\n[yq]: https://mikefarah.gitbook.io/yq/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnsgruk%2Ffirecracker-ubuntu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnsgruk%2Ffirecracker-ubuntu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnsgruk%2Ffirecracker-ubuntu/lists"}