{"id":50412789,"url":"https://github.com/omidiyanto/micro-vm-with-docker","last_synced_at":"2026-05-31T04:30:59.900Z","repository":{"id":357637123,"uuid":"1237851477","full_name":"omidiyanto/micro-vm-with-docker","owner":"omidiyanto","description":"Create VMs with Docker using virtctl the management CLI. Compiles to a single ~1.3 MB Rust binary with strict validation, idempotent operations, and a terraform-style declarative IaC workflow.","archived":false,"fork":false,"pushed_at":"2026-05-13T15:52:09.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T17:32:45.635Z","etag":null,"topics":["docker","infrastructure-as-code","linux","rust","vm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omidiyanto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T15:10:49.000Z","updated_at":"2026-05-13T15:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omidiyanto/micro-vm-with-docker","commit_stats":null,"previous_names":["omidiyanto/micro-vm-with-docker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/omidiyanto/micro-vm-with-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omidiyanto%2Fmicro-vm-with-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omidiyanto%2Fmicro-vm-with-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omidiyanto%2Fmicro-vm-with-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omidiyanto%2Fmicro-vm-with-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omidiyanto","download_url":"https://codeload.github.com/omidiyanto/micro-vm-with-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omidiyanto%2Fmicro-vm-with-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33719601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["docker","infrastructure-as-code","linux","rust","vm"],"created_at":"2026-05-31T04:30:59.840Z","updated_at":"2026-05-31T04:30:59.892Z","avatar_url":"https://github.com/omidiyanto.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VIRTCTL - MANAGE MICRO VMS WITH DOCKER\n\nA Docker-backed Micro VM management CLI. Compiles to a single ~1.3 MB binary with strict validation, idempotent operations, and a terraform-style declarative IaC workflow.\n\n---\n\n\u003e ## ⚠️ WARNING — EPHEMERAL MOCK VMs ONLY\n\u003e\n\u003e `virtctl` manages **ephemeral, non-persistent, mock micro-VMs** implemented as Docker containers running `systemd`. It is intended for **learning, local testing, and experimentation only**.\n\u003e\n\u003e - Container restart or host reboot **WILL LOSE all in-VM state** (filesystem, processes, user data).\n\u003e - \"Snapshots\" are local docker images (`docker commit`), **not real disk snapshots**. They are not crash-consistent.\n\u003e - \"Extra disks\" are loopback-mounted files inside the container; they vanish with the container.\n\u003e - This is **NOT a hypervisor** and **NOT a production VM platform**. There is no isolation guarantee comparable to KVM/Xen/VMware.\n\u003e\n\u003e **DO NOT use `virtctl` for production workloads, customer data, or anything you care about.**\n\n---\n\n## Getting Started\n\nInstall the latest `virtctl` binary in one line (Linux x86_64):\n\n```bash\ncurl -s https://raw.githubusercontent.com/omidiyanto/micro-vm-with-docker/refs/heads/main/install.sh | sh\n```\n\nThe installer downloads the latest published binary into `/usr/local/bin/virtctl`, marks it executable, and prints the installed version. It uses `sudo` internally, so you may be prompted for your password.\n\nVerify the install:\n\n```bash\nvirtctl --version\nvirtctl --help\n```\n\n## Build from source\n\n```bash\ncargo build --release\n# binary at target/release/virtctl\n```\n\n## Imperative usage\n\n```bash\n# host dependency check (warns about missing tools)\nvirtctl check\n\n# networks\nvirtctl network create --name net01 --subnet 172.25.0.0/24 --gateway 172.25.0.1\nvirtctl network list\nvirtctl network show net01\nvirtctl network modify --name net01 --dns 8.8.8.8,1.1.1.1\nvirtctl network destroy --name net01 -y\n\n# vms\nvirtctl vm create --name vm01 --network net01 --ipv4 172.25.0.10 --cpu 0.5 --ram 512M\nvirtctl vm create --name vm02 --network net01 --ipv4 DHCP --cpu 0.7 --ram 1G\nvirtctl vm list\nvirtctl vm show vm01\nvirtctl vm modify --name vm01 --cpu 1 --ram 1G\nvirtctl vm console --name vm01\nvirtctl vm state start   --name vm01\nvirtctl vm state stop    --name vm01\nvirtctl vm state restart --name vm01\nvirtctl vm destroy --name vm01 -y\n\n# snapshots (docker commit based; NOT a real disk snapshot)\nvirtctl vm snapshot backup  --vm-name vm01 --name pre-upgrade\nvirtctl vm snapshot list    --vm-name vm01\nvirtctl vm snapshot restore pre-upgrade --vm-name vm01\nvirtctl vm snapshot destroy pre-upgrade --vm-name vm01 -y\n\n# mock extra disks (lost when container is removed)\nvirtctl vm extra-disk --name vm01 --action attach --size 1G\nvirtctl vm extra-disk --name vm01 --action list\nvirtctl vm extra-disk --name vm01 --action remove --disk-name loop0\n```\n\n## Declarative IaC (terraform-like)\n\n```bash\nvirtctl iac -f examples/infra.yaml validate-config\nvirtctl iac -f examples/infra.yaml plan\nvirtctl iac -f examples/infra.yaml apply\nvirtctl iac -f examples/infra.yaml state\nvirtctl iac -f examples/infra.yaml destroy\n```\n\nState is tracked via Docker labels (`managed-by=virtctl`, `virtctl.iac-source=\u003cabs-path\u003e`), so the tool stays stateless on the host filesystem and remains idempotent across runs.\n\n## Help\n\nEvery level supports `--help` with detailed descriptions:\n\n```bash\nvirtctl --help\nvirtctl network --help\nvirtctl vm snapshot --help\nvirtctl iac --help\nvirtctl vm create --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomidiyanto%2Fmicro-vm-with-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomidiyanto%2Fmicro-vm-with-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomidiyanto%2Fmicro-vm-with-docker/lists"}