Virt Manager: Where is VM machine state saved?
I’ve been using Virt-manager to manage my VMs, and found it to be simple to use so far. One useful functionality from using VMs is the ability to save the state of the guest machine. This allows us to quickly resume running a machine, without going through the hassle of shutdown and startup.
Unfortunately, because of a lack of foresight, I’ve partitioned a meager amount of disk space on my host machine. I barely have enough space to save the machine state of one VM, let alone multiple VMs under the root partition. But no problem, surely theres an option to configure this with the Virt Manager GUI? Unfortunately I struggled and couldn’t find the option.
After a quick search on the web, I stumbled upon an user comment on unix stackexchange that gave me a clue to where this location is on the host filesystem. The comment from ned64 mentioned that the saved machine state is located in
/home/$USER/.config/libvirt/qemu/save, and suggested to symlink to another drive if a larger disk is needed.
I examined the directory when I saving and restoring vm state, but did not see any files being created. Hmmm… maybe theres another place the vm state is being saved to?
After a quick filesystem search, I found another save folder!
> sudo find / -type d -name 'save' -print ... /var/lib/libvirt/qemu/save
And so, after symlinking to my other drive, I have enough space to save VM states now!