• E
    snapshot: improve virsh snapshot-create, add snapshot-edit · 2b4d8deb
    Eric Blake 提交于
    Wire up the new snapshot creation flags in virsh.  For convenience,
    teach 'snapshot-current' how to make an existing snapshot become
    current (can be used after upgrading to newer libvirt to recover
    from the fact that the older libvirt lost track of the current
    snapshot after a restart).  The snapshot-create-as command is
    intentionally not taught --redefine or --current, as this would
    imply adding a lot of other options for everything else that can
    appear in the <domainsnapshot> xml, but which is normally read-only.
    Besides, redefining will usually be done on files created by
    snapshot-dumpxml, rather than something built up by hand on the
    command line.  And now that we can redefine, we can edit.
    
    * tools/virsh.c (cmdSnapshotCreate): Add --redefine, --current,
    and --no-metadata.
    (cmdSnapshotCreateAs): Add --no-metadata.
    (cmdSnapshotCurrent): Add snapshotname to alter current snapshot.
    (cmdSnapshotEdit): New command.
    * tools/virsh.pod (snapshot-create, snapshot-create-as)
    (snapshot-current, snapshot-edit):  Document these.
    2b4d8deb
virsh.pod 71.7 KB