After upgrading OpenSUSE to 42.2 to a new partition the VM definitions in virt-manager have all gone (of course), because they still exist only in the old partition. Is there a way for me to copy some files from the old partition to the new partition such that the VM definitions from the previous install are again available in the new install?
Hi and welcome to the forum
I don’t see why not, you just need to mount the partition and copy the relevant files over from /var/lib/libvirt (or where ever they were stored).
User files should be in ~/.config/libvirt and ~/.cache/libvirt and virt-manager.
~/.config/libvirt and ~/.cache/libvirt didn’t exist.
I removed /var/lib/libvirt and /var/cache/libvirt and copied those from the old partition to the new, but after restart virt-manager still doesn’t show my old VMs.
I personally haven’t had too much success migrating the virt-manager entries…
But, AFAIK the proper way is to use the dumpxml method described in this Reddit post (sorry, I’m not spending more time to find a proper authoritative source)
I don’t know that the more straight-forward way you’re trying will work…
It’s been a long time since I last tried to do this, and I think I tried something like what you’re attempting and it didn’t work.
In the end, I felt that if you’re dealing with less than 20 or so Guests it’s probably not that onerous to just “create new…” pointing to the exiting virtual disk files and re-create the VMs.