Per subject. Obviously only for use by folks who *really* know what
they're doing. :)
I'm looking for the ability to restore a snapshot saved with
domain.save(), with disk images pointing at a different location (in my
particular use case, pointing at a an empty copy-and-write image
backending into a snapshot of the old disk state). Further, as I may run
multiple copies of the same host at once (from the same initial state,
against different copy-on-write disk images backending into the same
read-only store, into different disconnected networks), the UUID as well
as the name may need to be changed.
I could just rewrite the header of the saved-state file, but this has a
few disadvantages:
- To mimic the copy-on-write behavior of the disk images, I would need
to copy the entire saved-domain file. I'm trying to minimize the time
and disk penalty of snapshot/restore, so this is suboptimal.
- My code is dependent on the file format used by the particular
backend, and may break when that backend is revved.
Would a patch adding API calls to
- return the XML description of a saved host, given the name
- restore a saved host with a different description
be considered welcome?
I presume that to maintain backwards compatibility, the latter would be
expected to be exposed to clients via a new call, rather than adding a
parameter to virDomainRestore(); in communicating with the drivers, on
the other hand, my first instinct would be to add an extra parameter to
virDrvDomainRestore.
Thanks!
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list