You are not logged in.

#1 2021-09-21 13:58:50

Peregrino69
Member
Registered: 2016-03-11
Posts: 89

How to change KVM/QEMU default folders?

I've created a few machines with Virtual Machine Manager. Now I suddenly noticed that my / space is way fuller than I want. Quick check shows that 2 of my 5 .qcows are stored in /var/lib/libvirt/images - I must've fat-fingered those as three others are in the data partition where I want them.

The problem root is in /var/lib/libvirt/qemu/save. I don't usually shut down the VMs, I just save the state, and all saves end up here. I've not found a way to change the save directory - researching the issue it seems it's actually not possible at all, more than a bit surprising at this day and age.

Can someone with more experience confirm or deny?

If it is possible, could you please point me to instructions?

If not possible, can I work around by symlinking qemu/save and libvirt/images to a more convenient location?

Offline

#2 2021-09-21 14:49:47

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,240

Re: How to change KVM/QEMU default folders?

Peregrino69 wrote:

If not possible, can I work around by symlinking qemu/save and libvirt/images to a more convenient location?

Yes, of cource, you can symlink /var/lib/libvirt/, to /data or /home.

Shutdown all vm's first. Move /var/lib/libvirt/, to the new location and symlink it back to /var/lib/libvirt.

I use mc to create symlinks, less risk of making syntax errors.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

Board footer

Powered by FluxBB