Commit Graph

34 Commits

Author SHA1 Message Date
a-kenji
c3a491a8d9 state: remove /home from default state folders
Home should not always be set by default.
In the UI we can suggest it, but it catches a lot of state you might not
want to back up.

The default has been moved to be automatically set by vm's in `vm.nix`.
2024-08-20 10:02:12 +00:00
Jörg Thalheim
b8fe60a4f7 stop using sysusers inside vm 2024-08-15 17:30:38 +02:00
Johannes Kirschbauer
742e0a71b5 Clan-core: Rename clanName within Machines 2024-08-06 12:21:46 +02:00
DavHau
629861d404 tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
Qubasa
31161322d6 clan-vm-manager: Fix waypipe regression in nix code 2024-07-23 13:20:02 +02:00
Jörg Thalheim
7004d1ea7f cleanup deprecated facts options 2024-07-21 18:11:30 +02:00
DavHau
4db2e8303f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
DavHau
93f0ee9dd3 vm.nix: fix typo in comment 2024-06-11 14:44:08 -07:00
Jörg Thalheim
908fdb444f drop deprecated mdDoc 2024-05-28 13:35:11 +02:00
Jörg Thalheim
ede4d3f6e5 re-format with nixfmt 2024-03-17 19:48:49 +01:00
a-kenji
20074bf5ec enable: spice-vdagent if xserver is enable 2024-03-12 16:00:54 +00:00
Jörg Thalheim
49d1704153 optimize filesystem mount flags
perf!
2024-02-14 13:01:47 +01:00
Jörg Thalheim
aa6123a798 vms: enable sysusers 2024-02-13 14:14:54 +01:00
Jörg Thalheim
2202e5a001 fix virtiofsd in CIs 2024-02-13 13:57:52 +01:00
Jörg Thalheim
d2d4267003 format rootfs in vm itself 2024-02-13 11:45:42 +01:00
Jörg Thalheim
4c6a95c844 drop unused mounts 2024-02-13 11:45:42 +01:00
Jörg Thalheim
1c1b613598 simplify vmstate directory 2024-02-13 11:45:42 +01:00
Jörg Thalheim
8f7eb704c7 vms: integrate virtiofsd 2024-02-13 11:44:17 +01:00
DavHau
a438a27c69 vms: init graceful shutdown for GUI
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI

the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
Qubasa
8194b61e4b cli,nix: Add machine_icon, machine_description 2024-02-06 19:25:34 +07:00
a-kenji
de041d4b2c vms: rename wayland attrs to waypipe
And remove the options from the cli interface.
2024-02-01 10:14:36 +07:00
a-kenji
7000caafa9 vms: wayland attr specified in configuration 2024-02-01 09:00:43 +07:00
DavHau
af9b4c32e8 Reapply "vm-state: fix and improve testing"
This reverts commit a429ab5d3c.

vm-state: revert sysusers, improve testing

zerotier: enable persistence

vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
DavHau
a429ab5d3c Revert "vm-state: fix and improve testing"
This reverts commit 41c97a5fce.
2024-01-29 15:16:10 +07:00
DavHau
41c97a5fce vm-state: fix and improve testing
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
lassulus
1d4e533438 move secret stores into clan_cli codebase 2024-01-24 15:49:12 +01:00
DavHau
4bdf769075 VMs: persist state folders on host
Done:
- move vm inspect attrs from system.clan.vm.config to clanCore.vm.inspect. This gives us proper name and type checking. everything in `system` is basically freeform, so the previous option definitions were never enforced
- when running VMs, mount state directory from ~/.config/clan/vmstate/{...} from the host to /var/vmstate inside the vm
- create bind mount inside the VM from /var/vmstate/{folder} to / for all folders defined in clanCore.state.<name>.folders

TODOs:
- make sure directories in ~/.config/clan/vmstate never collide (include hash of clan-url, etc.)
- port impure test to python
2024-01-08 18:38:07 +07:00
Jörg Thalheim
d7a9c1bc96 switch to initrd.systemd by default 2023-12-08 16:17:58 +01:00
Jörg Thalheim
3054b9c77d move clanName into nixos machine configuration 2023-12-08 16:03:29 +01:00
Jörg Thalheim
44108e7dac add serial module to vms
This is useful for debugging in the cli.
2023-12-08 12:35:33 +01:00
lassulus
9457a0f4b9 vms: support secrets and fix cross compilation 2023-10-04 18:04:27 +02:00
lassulus
d1cf62cc59 clan-cli: init vm command 2023-09-29 19:18:27 +02:00
Jörg Thalheim
ded120d065 drop requirement for importing qemu-vm.nix 2023-09-27 14:54:01 +02:00
Jörg Thalheim
a29f301f84 add vms 2023-09-15 14:02:40 +00:00