{"id":42308015,"url":"https://github.com/pipelight/virshle","last_synced_at":"2026-02-05T05:07:29.753Z","repository":{"id":333269008,"uuid":"847016830","full_name":"pipelight/virshle","owner":"pipelight","description":"Virtual machines from the command line and TOML files.","archived":false,"fork":false,"pushed_at":"2026-01-18T09:37:55.000Z","size":1505,"stargazers_count":64,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-18T17:36:25.485Z","etag":null,"topics":["cloud-hypervisor","virtual-machine","virtualization"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pipelight.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-24T15:58:59.000Z","updated_at":"2026-01-18T09:37:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pipelight/virshle","commit_stats":null,"previous_names":["pipelight/virshle"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pipelight/virshle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fvirshle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fvirshle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fvirshle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fvirshle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pipelight","download_url":"https://codeload.github.com/pipelight/virshle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fvirshle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cloud-hypervisor","virtual-machine","virtualization"],"created_at":"2026-01-27T11:12:46.288Z","updated_at":"2026-02-05T05:07:29.748Z","avatar_url":"https://github.com/pipelight.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cspan\u003e\n\u003ch1\u003e\n\u003cimg width=\"125px\" alt=\"virshle_logo\" src=\"https://github.com/pipelight/virshle/blob/master/public/images/logo.png\"/\u003e\n\u003cp\u003eVirshle: A Virtual Machine Manager.\u003c/p\u003e\n\u003c/h1\u003e\n\u003c/span\u003e\n\nVirshle is a single command line utility to manage multiple virtual machines.\n\n- It works on top of [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor)\n  and\n  [linux-kvm](https://linux-kvm.org/page/Main_Page)\n  for machines virtualization,\n- Makes extensive use of\n  [openvswitch](https://github.com/openvswitch/ovs)\n  for network configuration.\n- Use [pipelight-init](https://github.com/pipelight/pipelight) for fast\n  vm provisioning on boot.\n\n\u003e [!WARNING]\n\u003e Early development stage.\n\u003e Multinode is not stable.\n\n## Getting started.\n\nVirshle is a cli(client) that can control multiple nodes(servers)\nthat manage multiple vm(virtual machine) themselves.\n\nSo before creating a vm, you'll have to **spin up a node first**.\n\n```txt\n┌──────┬──────┐\n│      │      │\n│      │      │\n│ vm_1 │ vm_2 │\n│      │      │\n│      │      │\n├──────┴──────┴──────┐\n│   node             │\n└─────▲──────────────┘\n      │\n      │\n      │\n┌─────┴───┐\n│         │\n│   cli   │\n│         │\n└─────────┘\n```\n\n### Start a local node.\n\nIt is what you want for fast and easy vm creation on your local machine.\n\nThe following command creates the required resources on host:\n\n- filesystem paths(/var/lib/virshle) and config path (/etc/virshle),\n- vm database(/var/lib/virshle.sqlite),\n- client-server communication socket(/var/lib/virshle.sock),\n- and host network configuration (ovs-system and br0 switches)\n\n```sh\nvirshle node init --all\n\n```\n\nThen run the virshle node daemon.\n\n```sh\nvirshle node serve -vvv\n```\n\n### Connect to your local node.\n\nWhen running a node on your local machine,\nthe cli automatically connects to the local node\nwithout further configuration.\n\nWhile listing available nodes, your local node appears with the name `default`.\n\n```sh\nvirshle node ls -vvv\n```\n\n![node_list_default](https://github.com/pipelight/virshle/blob/master/public/images/v_node_ls_vvv_default.png)\n\n### Create a VM.\n\nThe preferred way to create VMs with virshle is by the usage of templates.\n\nYou add some template definitions into the configuration file.\nA functional machine needs at least :\n\n- A bootable OS disk (mandatory),\n- Some cpu,\n- Some ram,\n\nSee the template below that defines a small machine preset named `xs`.\n\n```toml\n# /etc/virshle/config.toml\n\n[[template.vm]]\nname = \"xs\"\nvcpu = 1\nvram = 2\n\n[[template.vm.disk]]\nname = \"os\"\npath = \"~/Iso/nixos.efi.img\"\n# or\n# path = \"/var/lib/virshle/cache/nixos.efi.img\"\n\n[[template.vm.net]]\nname = \"main\"\n[template.vm.net.type.macvtap]\n```\n\nThen only can you create a machine from that template.\n\n```sh\nv vm create -t xs\n```\n\nList your VMs and associated information.\n\n```sh\nv vm ls\n```\n\n![vm_list](https://github.com/pipelight/virshle/blob/master/public/images/v_vm_ls.png)\n\nThen start your vm.\n\n```sh\n# Pattern\nv vm start --id \u003cvm_id\u003e --attach\n```\n\n### Start and provision a VM.\n\nYou need to provide the vm with **user_data** such as an ssh public key\nfor remote access.\n\nHere for we do not use the now conventional\n[cloud-init](https://cloudinit.readthedocs.io/en/latest/explanation/introduction.html#introduction),\nbut rather\n[pipelight-init](https://github.com/pipelight/pipelight)\nwhich shines when it comes to provisioning speed.\n\nYou can add user data to the Vm on creation or upon start up.\n\n- From a simple file.\n\n```toml\n# user-data.toml\n[ssh]\n[[ssh.user]]\nname = \"anon\"\nauthorized_keys = [\n  \"ssh-ed25519 AAAAC3NzXXX\",\n]\n```\n\n- With the following command\n\n```sh\n# Pattern\nv vm create --template \u003ctemplate_name\u003e --user_data \u003cuser_data_filepath\u003e\nv vm start --id \u003cvm_id\u003e\n\n# or\nv vm create --template \u003ctemplate_name\u003e\nv vm start --id \u003cvm_id\u003e --user_data \u003cuser_data_filepath\u003e\n\n# Example\nv vm create --template xs --user_data user_data.toml\n#or\nv vm start --id 1 --user_data user_data.toml\n```\n\nThen, you can access your via **ssh**:\n\n- On your local node and without any network configuration (vsock),\n\n  ```sh\n  ssh vm/\u003cvm_name\u003e\n  ```\n\n- with network,\n\n  Add a network configuration to the vm template\n\n  ```toml\n  # /etc/virshle/config.toml\n  [[template.vm.net]]\n  name = \"main\"\n  [template.vm.net.type.macvtap]\n  ```\n\n  ```sh\n  v vm create -t \u003ctemplate_name\u003e\n  ```\n\n  ```sh\n  v vm start --id \u003cvm_id\u003e\n  ```\n\n  With the vm_ip,\n\n  ```sh\n  ssh \u003cvm_ip\u003e\n  ```\n\n  With the vm_name,\n  depends on your dhcp/dns configuration.\n\n  ```sh\n  ssh vm-name.vm\n  ```\n\n### Access your VM\n\nEither attach the vm to a terminal standard outputs.\n\n```sh\nv vm start --id \u003cvm_id\u003e --attach\n```\n\n![vm_list](https://github.com/pipelight/virshle/blob/master/public/images/v_vm_ls_v.png)\n\n## Other configurations\n\n- **Custom disk images**,\n  See [docs/custom_disk.md](https://github.com/pipelight/virshle/blob/master/docs/custom_disk.md)\n\n- **Multiple nodes**,\n  Configure a cluster of multiple nodes.\n  See [docs/multi_node.md](https://github.com/pipelight/virshle/blob/master/docs/multi_node.md)\n\n- **Network configuration**,\n  Different network configurations.\n  See [docs/network.md](https://github.com/pipelight/virshle/blob/master/docs/network.md)\n\n## Install\n\n### NixOs (with flakes).\n\nAdd the repo url to your flake inputs.\n\n```nix\n# flake.nix\ninputs = {\n  virshle = {\n      url = \"github:pipelight/virshle\";\n  };\n};\n```\n\nAdd the module to your configuration.\n\n```nix\nnixosConfiguration = {\n    default = pkgs.lib.nixosSystem {\n        modules = [\n            inputs.acceptxmr.nixosModules.default\n        ];\n    };\n}\n```\n\nEnable the service.\n\n```nix\n# default.nix\nservices.virshle = {\n    enable = true;\n    logLevel = \"info\";\n    # The user to run the node as.\n    user = \"anon\";\n};\n```\n\n## Build a disk image.\n\n### Minimal image\n\n```nix\n\n```\n\n### Custom image\n\nYou can of course create custom disk image by importing\nthe base module onto a vm configuration.\n\n```nix\nxxs = inputs.nixos-generators.nixosGenerate {\n  format = \"raw-efi\";\n  modules = [\n    inputs.virshle.nixosModule.nixos-generators\n    {virtualisation.diskSize = 20 * 1024;}\n    # Add your modules\n    ./my/custom/config\n\n  ];\n};\n```\n\nSee [docs/install.md](https://github.com/pipelight/virshle/blob/master/docs/install.md)\nfor in depth nixos installation and **other distributions**.\n\n## Alternatives\n\nSimilar software can be found at:\n\n- [libvirt applications](https://libvirt.org/apps.html),\n- [multipass](https://github.com/cannonical/multipass)\n- [aurae](https://github.com/aurae-runtime/aurae)\n\nIf you want VM for specific usage like workload isolation,\nsome hypervisors may suit you better:\n\n- [Firecracker](https://github.com/firecracker-microvm/firecracker),\n- [CrosVm](https://chromium.googlesource.com/chromiumos/platform/crosvm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipelight%2Fvirshle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpipelight%2Fvirshle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipelight%2Fvirshle/lists"}