{"id":19915983,"url":"https://github.com/mysmartspaces/container-qemu","last_synced_at":"2025-03-01T09:23:59.885Z","repository":{"id":216947146,"uuid":"742610080","full_name":"mysmartspaces/container-qemu","owner":"mysmartspaces","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-17T08:09:46.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T23:25:11.673Z","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/mysmartspaces.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":"2024-01-12T21:31:58.000Z","updated_at":"2024-01-12T21:32:14.000Z","dependencies_parsed_at":"2024-01-13T20:50:58.927Z","dependency_job_id":"dcd50821-a6d8-4479-9859-d0713523b016","html_url":"https://github.com/mysmartspaces/container-qemu","commit_stats":null,"previous_names":["mysmartspaces/container-qemu"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysmartspaces%2Fcontainer-qemu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysmartspaces%2Fcontainer-qemu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysmartspaces%2Fcontainer-qemu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mysmartspaces%2Fcontainer-qemu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mysmartspaces","download_url":"https://codeload.github.com/mysmartspaces/container-qemu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241344364,"owners_count":19947539,"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","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":"2024-11-12T21:43:11.536Z","updated_at":"2025-03-01T09:23:59.861Z","avatar_url":"https://github.com/mysmartspaces.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qemu-docker\n\n[![Test](https://github.com/joshkunz/qemu-docker/actions/workflows/test.yaml/badge.svg)](https://github.com/joshkunz/qemu-docker/actions/workflows/test.yaml)\n\nThis repository contains a Docker container for running x86\\_64 virtual\nmachines using QEMU. It uses high-performance QEMU options\n(KVM, and TAP network driver).\n\nDocker Hub: [jkz0/qemu](https://hub.docker.com/r/jkz0/qemu)\n\n## Using the container\n\nVia `docker run`:\n\n```bash\n$ docker run --rm -it \\\n    --device=/dev/kvm:/dev/kvm --device=/dev/net/tun:/dev/net/tun \\\n    --cap-add NET_ADMIN -v $VM_IMAGE_FILE:/image \\\n    jkz0/qemu:latest\n```\n\nVia `docker-compose.yml`:\n\n```yaml\nversion: \"3\"\nservices:\n    vm:\n        image: jkz0/qemu:latest\n        cap_add:\n            - NET_ADMIN\n        devices:\n            - /dev/net/tun\n            - /dev/kvm\n        volumes:\n            - ${VM_IMAGE:?VM image must be supplied}:/image\n        restart: always\n```\n\n## Tips \n\n* VM networking is configured via DHCP, make sure to enable DHCP in your\n  VM image. VMs will use the IP address of the container.\n* You can quit the VM (when attached to the container) by entering the special\n  key sequence `C-a x`. Killing the docker container will also shut down the\n  VM.\n\n## Caveat Emptor\n\n* Only x86\\_64 supported new. PRs to support other architectures welcome,\n  though I imagine 99% of use-cases will be x86\\_64.\n* VMs will not be able to resolve container-names on user-defined bridges.\n  This is due to the way Docker's \"Embedded DNS\" server works. VMs can still\n  connect to other containers on the same bridge using IP addresses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysmartspaces%2Fcontainer-qemu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysmartspaces%2Fcontainer-qemu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysmartspaces%2Fcontainer-qemu/lists"}