{"id":34642331,"url":"https://github.com/mbailey/bash-my-kvm","last_synced_at":"2026-05-22T23:31:05.312Z","repository":{"id":66297499,"uuid":"586387574","full_name":"mbailey/bash-my-kvm","owner":"mbailey","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-15T01:13:23.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-15T19:42:41.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/mbailey.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-08T00:08:05.000Z","updated_at":"2025-06-12T07:17:38.000Z","dependencies_parsed_at":"2023-04-06T05:04:34.314Z","dependency_job_id":"6d6140e2-91a1-4b4e-9731-755b29bd5eab","html_url":"https://github.com/mbailey/bash-my-kvm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbailey/bash-my-kvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbailey%2Fbash-my-kvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbailey%2Fbash-my-kvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbailey%2Fbash-my-kvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbailey%2Fbash-my-kvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbailey","download_url":"https://codeload.github.com/mbailey/bash-my-kvm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbailey%2Fbash-my-kvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33376041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-22T21:56:13.512Z","status":"ssl_error","status_checked_at":"2026-05-22T21:56:10.769Z","response_time":265,"last_error":"SSL_read: 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":[],"created_at":"2025-12-24T17:25:24.847Z","updated_at":"2026-05-22T23:31:05.307Z","avatar_url":"https://github.com/mbailey.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash-my-kvm\n\nCreate various flavours of linux VMs in no time.\n\nCurrently only one command: `kvm-guest-create`\n\n- Takes ~35 seconds from running script till SSH being available\n- Amazon Linux 2, Fedora, Rocky Linux\n- Guests findable by name from host and each other with zero config\n- On first boot:\n      - runs system update\n      - installs tailscale\n\n## TODO\n\n- bash completion on available distros\n- fix ssh between guests (Add Tailscale domain to /etc/resolv.conf)\n\n## Usage\n\n```shell\nGUEST_NAME=grafana\n\nexport LIBVIRT_IMAGES_DIR=~/.libvirt/images # optional for non-root usage\n\nsudo bin/kvm-guest-create \"${GUEST_NAME}-amazon\" amazon\n```\n\n## Install Deps (fedora-36)\n\n```shell\nsudo yum install -y                \\\n      genisoimage                  \\\n      guestfs-tools                \\\n      libvirt                      \\\n      libvirt-client               \\\n      libvirt-dbus                 \\\n      policycoreutils-python-utils \\\n      qemu-kvm                     \\\n      virt-install                 \\\n      virt-manager                 \\\n      virt-viewer                  \\\n\nsudo systemctl enable --now libvirtd.service # required?\n```\n\n## Configure\n\n- [Configure Rootless access](https://github.com/mbailey/notes/tree/master/docs/libvirt)\n  - Use libvirt as non root user\n  - Change default location for libvirt-images\n\n### Configure SSH key / password in `config/user-data`.\n\nOptionally update the default username / password / SSH public key.\n\n### Make guests addressable by name from host by name\n\n- [Libvirt NSS module (libvirt.org)](https://libvirt.org/nss.html)\n\nMake guests addressable from host by name:\n\n```shell\nsudo yum install -y libvirt-nss ## RHEL/CentOS/Fedora ##\nsudo apt install libnss-libvirt ## Debian/Ubuntu ##\n```\n\nAdd `libvirt libvirt_guest` to hosts entry of nsswitch:\n\n```shell\n$ grep hosts /etc/nsswitch.conf\nhosts:       files libvirt libvirt_guest dns\n```\n\n## Create your kvm guest\n\n```shell\nbin/kvm-guest-create GUEST_NAME [GUEST_TYPE] # amzn2, fedora, rocky, etc\n```\n\n## Working with your guests\n\nConnect to guest console:\n\n```shell\nvirsh console $GUEST_NAME\n```\n\nSSH to it's IP address (accessible by name from host or other guests):\n\n```shell\nssh admin@$GUEST_NAME\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbailey%2Fbash-my-kvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbailey%2Fbash-my-kvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbailey%2Fbash-my-kvm/lists"}