Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1401513
  • 博文数量: 343
  • 博客积分: 13098
  • 博客等级: 上将
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-06 00:35
文章存档

2012年(131)

2011年(31)

2010年(53)

2009年(23)

2008年(62)

2007年(2)

2006年(36)

2005年(5)

分类: 虚拟化

2012-07-26 20:43:05

[打快照]

qemu-img snapshot -c booting vm2.qcow2

[查看快照]
qemu-img snapshot -l /images/vm2.qcow2

[从快照恢复]

qemu-img snapshot -a 1 /images/vm2.qcow2
然后从kvm启动这个虚拟机,会发现虚拟机又在打快照时的状态了

[删除快照]
qemu-img snapshot -d 2 /images/vm2.qcow2

[ROW快照]

Snapshots in QEMU are images that refer to an original image using Redirect-on-Write to avoid changing the original image. If you want to create a snapshot of an existing image called centos-cleaninstall.img, create a new QCow2 file using the -b flag to indicate a backing file. The new image is now a read/write snapshot of the original image -- any changes to snapshot.img will not be reflected in centos-cleaninstall.img.

qemu-img create -f qcow2 -b centos-cleaninstall.img snapshot.img

[临时快照]
QEMU also supports temporary snapshots, where the user does not have to explicitly create a separate .img file. With the -snapshot flag, any changes made to the virtual machine while it is running are written to temporary files and thrown away when the virtual machine is turned off. No changes are saved to the original .img file.

qemu -hda centos-cleaninstall.img -snapshot

阅读(2431) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~