Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.34 KB

File metadata and controls

48 lines (34 loc) · 1.34 KB

How virshle works.

It is based on cloud-hypervisor wich is a virtual machine manager (type-2 hypervisor).

Virshle manages the resources like vms, disks, and networks.

Internal.

The aim is to keep stuffs simple, so virshle only manages files.

  • The disk (containing the OS) is a simple qcow2 files with efi support generated with nixos-generators.

  • Each vm is a running instance of cloud-hypervisor linked to its own resources (disks, networks).

For the sake of speed resources are registered into a database, which one is not crucial for virshle functionning. The database acts like an index and can be generated from virshle managed files in /var/lib/virshle/

Rest API

No need to sort Vms by id in rust code, because they are already sorted by id in the database.

Structs returned by the API are sorted by id.

Nixos Tests

nix flake update --flake ./templates/test/virshle virshle
nixos-rebuild build \
      --flake "./templates/tests/virshle#default" \
      --log-format multiline-with-logs \
      --show-trace
nix flake update --flake ./modules/tests/openvswitch virshle
nixos-rebuild build \
      --flake "./modules/tests/openvswitch#default" \
      --log-format multiline-with-logs \
      --show-trace