Snapshots used to be a common feature when using VMware and VirtualBox, and are also useful. KVM Virtual machine operation mode:
one, built-in snapshots
# Create snapshot [[Email protected] ~]$ qemu-img snapshot -c networknode_ justinstall.img networknode.img # viewing virtual machine snapshots [[email protected] ~]$ qemu-img snapshot -l networknode.img snapshot list:id TAG VM SIZE DATE VM CLOCK1 networknode_justinstall.img 0 2014-11-29 17:55:47 00:00:00.000# Deleting a virtual machine snapshot [[email protected] ~]$ qemu-img snapshot -d networknode.img# View virtual machine snapshots (no information is output by default when no snapshots are taken) [[email protected] ~]$ qemu-img snapshot -l networknode.img&nbsP [[email protected] ~]$
Snapshot recovery, operating scenarios:
1. Perform a snapshot on a newly installed virtual machine (the steps above have already been done)
2. Remove all files from the/etc/directory on the virtual machine
# Launch virtual machine [[email protected] ~]$ qemu-kvm-m 4096-SMP 4-hda networknode.img
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/26/wKiom1R5pnPDcoXJAAEsQQ1EtgU891.jpg "title=" x2.png "alt=" Wkiom1r5pnpdcoxjaaesqq1etgu891.jpg "/>
3. Recovering a Snapshot
# View recoverable virtual machine snapshots [[email protected]t ~]$ qemu-img snapshot-l networknode.imgsnapshot list:id TAG VM SI ZE DATE VM CLOCK1 networknode_justinstall.img 0 2014-11-29 17:55:47 00:00:00.000# Recovery Snapshot [Email protected] ~]$ qemu-img snapshot-a networknode_justinstall.img networknode.img[[email protected] ~]$
4. See if the/etc/directory exists
# Launch virtual machine [[email protected] ~]$ qemu-kvm-m 4096-SMP 4-hda networknode.img
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/26/wKiom1R5qAzDPrawAAPu_FasBTE096.jpg "title=" x3.png "alt=" Wkiom1r5qazdprawaapu_fasbte096.jpg "/>
This article is from the Software testing blog, so be sure to keep this source http://9614554.blog.51cto.com/9604554/1584538
KVM Virtual machine Snapshot (continuous update)