KVM默认的文件格式是raw,也就是使用文件来模拟实际的硬盘(当然也可以使用一块真实的硬盘或一个分区),不过raw格式只支持内存快照(就是启动的 时候加-snapshot,所有更改都写到内存),重启之后就没了。
Domain snapshot 1420722577 created
# virsh snapshot-list rhel6.3
Name Creation Time State
------------------------------------------------------------
1420722577 2015-01-08 21:09:37 +0800 running
Domain snapshot before-install-vnc created
Name Creation Time State
------------------------------------------------------------
before-install-vnc 2015-01-08 21:16:05 +0800 running
Domain snapshot 1420722577 deleted
error: revert requires force: Target controller type ide does not match source usb
Domain rhel6.3 is being shutdown
# virsh snapshot-revert rhel6.3 before-install-vnc(//快照名)
# virsh list --all
Id Name State
----------------------------------------------------
3 xp running
7 rhel6.3 running //快照恢复完成后自动打开了电源
iface-begin create a snapshot of current interfaces settings, which can be later committed (iface-commit) or restored (iface-rollback)
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