
On 04/17/2013 07:35 AM, Skardal, Harald wrote:
I have not found support in libvirt (nor virsh) for doing the equivalent of "qemu-img rebase ....".
Correct - offline image manipulation is something I'd love to see added, but last time I worked on the issue, I realized that there is a LOT of design work still needed. With online image chain manipulation, we can start a long-running job, and qemu keeps track of it for us. So we can restart libvirtd, and then ask qemu if the job is done yet, thanks to qemu supporting a Unix socket monitor connection that we can reconnect to at will. But with offline image manipulation, a long-running job means spawning a qemu-img child process, and that does not have an ability to reconnect. So libvirt itself would be responsible for setting up enough management resources that the management of qemu-img can survive a libvirtd restart. Not as trivial as I'd like.
The use case:
You have copied a qcow2 stack and the new files have different names or reside in a different directory. Therefore you need to change the backing file.
Is there a way to do this? Is this a planned addition to libvirt?
Yes, it's planned, but only when someone has enough time to make it their highest priority effort in patching efforts. In the meantime, you have to settle with doing qemu-img calls yourself, then updating libvirt's state to match your manual changes. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org