Cockpit: machines: Missing Snapshots support

Created on 18 Oct 2019  路  10Comments  路  Source: cockpit-project/cockpit

Page: Machines

Originally came in via the Red Hat bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1673158

Problem:
Sysadmins who handle VMs needs a way to snapshot the current state of a VM, do some potentially damaging operations, and have the ability to roll back to a previously well working state of the machine.

Initial scope:

  • [x] Create a new snapshot with name, description and timestamp: to make them easier to recognize to yourself and coworkers.
  • [x] Ability to roll back state of a VM to a snapshot: to restore to a previously state that is known to work well.
  • [x] Delete snapshot: to save up space or to clear up the list of objects to keep track of.
  • [x] These should be internal libvirt ones for now, external snapshots are still being worked on by libvirt team.
  • [ ] Hide the snapshot section for VMs that are not in qcow2-format.
  • [ ] Nice-to-have: Description of parent-child for snapshots of snapshots of snapshots (edgier case)
  • [ ] Nice-to-have: Differ between VMs with RAM snapshots (running state) and those without.
enhancement has-design

Most helpful comment

I'm interested in this feature. Thank you for your work.

All 10 comments

Some quick explanation for the mockup:

  • the little lightning icon is the current snapshot
  • No dialog for creating snapshot. It will just get an autogenerated name. An admin can rename it or edit the description later if they want to identify them more easily in the future. But making a snapshot needs to be a breeze.

Some years ago I tested also snapshot on vm with raw disks and was possible:
with "virsh snapshot-create-as" it created additional qcow disks file with base file the raw ones; if critical operation "fails" stop the vm delete the qcow file and change the vm xml to repoint to the base raw file (virsh snapshot-revert to external snapshot was not supported, I didn't retest recently); if was ok use "virsh blockcommit" for consolidate qcow in the base file raw.
If I'll have time and needed I'll retest it and I'll post the exact procedure with exact command parameters.

Looks great!
Just some small comments:
"Create Snapshot" button should have default (white) design instead of primary (blue) since we use default design for all "Create something" buttons (apart from disks).
Is there any specific reason to have "Rename" and "Edit description" functionalities separate instead of single "Edit"?

@skobyda good calls! I've made the button default and merged the _Rename_ and _Edit description_ menu items.
Also discussed the design with @Ranelim and he pointed out it would be weird to single out the current snapshot, since the snapshot doesn't reflect the current state of the system, since a rollback could possibly have happened years ago.

mockup

I'm interested in this feature. Thank you for your work.

Will be really pleased when this feature is available :-)

+1

This is done.

Was this page helpful?
0 / 5 - 0 ratings