-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, we launch a VM and we don't wait for the /usr/bin/qemu-system-x86_64 execution to finish. We do like so in order not to block manager while the launched VM is running.
Also, when VMs are running, they create artefacts, especially firmware vars file and disk image file. Currently, we delete those files on SIGTERM. On SIGKILL files are not properly removed. We would like to clean up artefacts immediately after the VM shuts down.
For both of these tasks we need to use *exec.Cmd ptr to struct that is returned when we run qemu-system-x86_64 command.
NB: Manager should probably have some sort of in RAM VM key value store, like Redis, so it knows which machines are currently running. This could also be probably solved via libvirt or maybe QEMU itself (by corresponding queries). This is important because when Manager restarts or while running, it needs to know what VMs are spinned up.
NB: This is connected to ultravioletrs/agent-OLD#42.