[virt-tools-list] [virt-manager][PATCH ] Add basic snapshot support.

Cole Robinson crobinso at redhat.com
Mon Aug 5 21:51:33 UTC 2013


On 08/02/2013 03:27 PM, Leonardo Garcia wrote:
> From: Leonardo Garcia <lagarcia at br.ibm.com>
> 

Thanks for the patch. Would you believe I was working on the same thing just
last friday? I'm trying to get snapshot support ready as part of my Fedora work:

https://fedoraproject.org/wiki/Changes/Virt_Manager_Snapshots

We had the exact same idea about how to expose it in the details view :)
However the rest is a bit different: I went with a view similar to how the
virtual network, storage, and interface pages look, with a list on the left
side and a details pane on the right. While there isn't too much interesting
in the snapshot XML besides name and timestamp, I also want to leave open the
option of showing a screenshot on that page.

My work also splits the snapshot UI logic out into a snapshot.py file, similar
to how console.py is split out. details.py is large enough as is.

However mine doesn't do much of anything useful yet :) Because there's a few
details here that take some care.

- Not all hypervisors support snapshots, so we need to de-sensitize the UI
here and set clear tooltips. Also, depending on the snapshot type, not all
guest configurations are supported, and not all libvirt versions are
supported. Getting this clear is important to save us from future bug reports.

- There's several different types of snapshots. qcow2 internal snapshots have
been available the longest and are certainly simplest WRT the desktop usecase.
However they have historically been frowned upon by some QEMU developers
because they are non-live, and slow (although apparently recent qemu 1.6 is
better). And most recent upstream qemu activity is based around external
snapshots. Punting the decision to the user with a checkbox in the UI or
similar is not too friendly, since most people won't know which one they want,
and we will have to choose a default anyways. So my thought was to only allow
creating these new style external snapshots. We could still list any
pre-existing internal snapshots and allow reverting to them. So there's a lot
of variables here.

I'd like to work together though, but I think it's better to start with my UI
as base. I'll clean it up a bit and push it to a separate branch upstream,
probably in a couple days, and report back here. Then please submit patches
against that. When things are ready, I'll rebase things to clean up the
history, preserving proper attribution, and merge it into the master branch.
Sound fair?

Thanks,
Cole



> Signed-off-by: Leonardo Garcia <lagarcia at br.ibm.com>
> Signed-off-by: Eduardo Elias Ferreira <edusf at linux.vnet.ibm.com>
> ---
>  ui/vmm-details.ui      |  179 ++++++++++++++++++++++++++++++++++++++++++++++++
>  virtManager/details.py |  150 ++++++++++++++++++++++++++++++++++-------
>  virtManager/domain.py  |   34 +++++++++
>  virtManager/engine.py  |   33 +++++++++
>  virtManager/error.py   |   23 ++++--
>  5 files changed, 388 insertions(+), 31 deletions(-)
> 




More information about the virt-tools-list mailing list