Fedora18KVM online snapshot function experience

Source: Internet
Author: User
Fedora18 was released. One of the most exciting features in virtualization is online snapshots. In the past, KVM used to take snapshots and the virtual opportunity was automatically paused. Now, this problem has been overcome. Lab environment: hardware Intel (R) Xeon (R) CPUE5540@2.53GHz6G memory 80Gsata hard drive software fedora18kernel3.7.2-204. fc18.x8 Fedora 18 released, one of the most exciting features of virtualization is online snapshot. In the past, KVM used to take snapshots and the virtual opportunity was automatically paused. Now, this problem has been overcome.
 
Lab environment:
 
Hardware Intel (R) Xeon (R) CPU E5540 @ 2.53 GHz 6G memory 80G sata hard drive
 
Software fedora 18 kernel 3.7.2-204. fc18.x86 _ 64
 
Currently, virt-manager does not support snapshots. You can only use the virsh command line. Online snapshots only support virtual machines with raw and qcow2 disks.
 
During the test, two virtual machines are created, w, test1, and w are in raw format, and test1 is in qcow2 format. Run the following command to create a snapshot and ping the VM all the time, snapshots are generated in an instant without packet loss.
 
Virsh snapshot-create-as w snapshot1 "snapshot1 description" -- disk-only-atomic
 
Virsh snapshot-create-as test1 snapshot1 "snapshot1 description" -- disk-only -- atomic
 
The created snapshot is associated with the Virtual Machine disk image file, and the snapshot is in qcow2 format.
 
[Root @ localhost datapool] # ls
 
Test01.qcow2 test01.snapshot1
 
[Root @ localhost datapool] # qemu-img info test01.snapshot1
 
Image: test01.snapshot1
 
File format: qcow2
 
Virtual size: 60 GB (64424509440 bytes)
 
Disk size: 516 K
 
Cluster size: 65536
 
Backing file:/datapool/test01.qcow2
 
 
 
 
 
[Root @ localhost images] # qemu-img info w. snapshot1
 
Image: w. snapshot1
 
File format: qcow2
 
Virtual size: 8.0 GB (8589934592 bytes)
 
Disk size: 6.6 M
 
Cluster size: 65536
 
Backing file:/var/lib/libvirt/images/w. img
 
Snapshot list:
 
ID TAG VM SIZE DATE VM CLOCK
 
1 snapshot2 6.3 M 14:29:06. 854
 
[Root @ localhost images] # qemu-img info w. img
 
Image: w. img
 
File format: raw
 
Virtual size: 8.0 GB (8589934592 bytes)
 
Disk size: 0
 
[Root @ localhost images] #
 
 
 
Common commands:
 
 
 
List VM snapshots
 
Virsh # snapshot-list w
 
Name Creation Time status
 
------------------------------------------------------------
 
Snapshot1 13:29:32 + 0800 disk-snapshot
 
Snapshot2 14:29:06 + 0800 running
 
 
 
Roll back the VM to the previous Snapshot
 
Virsh snapshot-revert w snapshot2
 
 
 
Combines changes in Virtual Machine images to snapshots.
 
Virsh blockpull -- domain w -- path/var/lib/libvirt/images/w. snapshot1
 
Delete a snapshot
 
Virsh snapshot-delete w snapshot2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.