diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-24 13:19:08 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-19 12:02:08 +0100 |
commit | fa82aab3e9e296c0c4177f2e991338842ad638b8 (patch) | |
tree | 5608a4f977b09ea484d9245cd8e7424ac9b51d75 /.gitignore | |
parent | 673c7dfc96cfd949b94caa23b944ed3489f4bf5d (diff) | |
download | spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar.gz spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar.bz2 spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar.lz spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar.xz spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.tar.zst spectrum-fa82aab3e9e296c0c4177f2e991338842ad638b8.zip |
[meson#12637] host: allow VMs to be powered off
Before this change, the s6 services for cloud-hypervisor and virtiofsd were only started when a VM was started, and vm-stop would bring the service down. The problem with this was that if a VM powered itself off, instead of being stopped on the host using vm-stop, the VM would instantly be restarted by s6. To fix this, we disentangle keeping cloud-hypervisor running from keeping the VM running. cloud-hypervisor will now always be running, so s6 will never restart it in normal operation, but it won't be running a VM until it's told to. Accomplishing this means having start-vmm (renamed from start-vm to reflect its new purpose) configure the VM in cloud-hypervisor without booting it, which is only possible using the API, not the command line. As a result, start-vm now depends on miniserde so that it can construct the VM config JSON object required by the API. The build of start-vm has been adjusted to accomodate the complexity stemming from the new dependencies. Tests are moved into passthru, because the start-vm used in Spectrum should have panic=abort, but tests need panic=unwind, and we can't use both in the same Meson instance without duplicating the non-native dependencies. We can't use s6-rc dependencies to automatically boot provider VMs in this setup, so vm-start has been modified to recurse into provider VMs. lsvm has been updated to check the Cloud Hypervisor API to see whether a VM is running, rather than just checking to see whether the s6 service is up. Because cloud-hypervisor is now to be started as early as possible, we need to make the dependencies of ext-rc-init more precise, so that cloud-hypervisor does not attempt to start before /dev/kvm or /dev/net/tun is available. We're not using Meson's support for Cargo subprojects yet, because it currently always builds crates with all features enabled. Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index e9858b9..0491ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ # SPDX-License-Identifier: CC0-1.0 -# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is> +# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is> /config.nix build/ result result-* + +**/subprojects/* +!**/subprojects/*.wrap +!**/subprojects/packagefiles |