不行啊,需要不停的安装测试软件。

不停的反复回到初始的状态,没办法用快照把。

首先需要 shutdown kvm 虚机

virsh destory vis-168-85-40  

先查查都有什么命令:

virsh --help|grep snapshot  
 Snapshot (help keyword 'snapshot')
    snapshot-create                Create a snapshot from XML
    snapshot-create-as             Create a snapshot from a set of args
    snapshot-current               Get or set the current snapshot
    snapshot-delete                Delete a domain snapshot
    snapshot-dumpxml               Dump XML for a domain snapshot
    snapshot-edit                  edit XML for a snapshot
    snapshot-info                  snapshot information
    snapshot-list                  List snapshots for a domain
    snapshot-parent                Get the name of the parent of a snapshot
    snapshot-revert                Revert a domain to a snapshot

如果想知道单独命令的用法:

virsh snapshot-create-as --help  

新建立个快照

virsh snapshot-create-as --domain vis-168-86-40 --name init  

看看虚机都有什么快照

virsh snapshot-list --domain vis-168-86-40  

快照多了如何删除:

virsh snapshot-delete --domain vis-168-86-40 init  

回到快照的状态:

virsh snapshot-revert --domain vis-168-85-40 --snapshotname init --running  
comments powered by Disqus