-
What is KVM snapshot?
-
Create KVM snapshot with virsh command
-
Take KVM snapshot with virt-manager
-
Backup KVM virtual machine with Vinchin Backup & Recovery
-
Sum Up
KVM is one of the mainstream virtualization solutions. There are also some KVM-based virtualization solutions like Red Hat Virtualization, oVirt, Open Stack, Oracle Linux KVM. To make virtual environment work with good performance, IT administrators need to know how to manage KVM environment.
The jobs of IT administrators include saving VM data and recovering VM when necessary. Snapshot is the technology to quickly save VM data and recover VM so it is necessary for IT administrators to learn this technology.
What is KVM snapshot?
Snapshot is very useful for patching, installing applications, etc. It will save VM state so you can easily recover VM to the previous state if you are not satisfied with the update. It is a popular technology and most mainstream virtualization vendors provide their snapshot features like VMware snapshot and Hyper-V checkpoint.
Snapshot vs Backup: Backup is also the solution to recover VM when it is necessary but what's the difference between backup and snapshot. Generally speaking, KVM backup will contain at least one full VM backup and then the incremental backup and differential backup can be made. It requires exporting VM data and storing it on another storage. However, snapshot is often stored with the original VM data. The original VM data is like the “full backup”.
Both snapshot and backup can help recover virtual machine but snapshot can't work if the original VM data is broken so the backup is still the most effective solution for disaster recovery.
KVM incremental backup is not easy to create, so that some IT administrators choose to create snapshot as KVM backup, while snapshot is not recommended to exist for more than 72 hours because it will grow and influence the performance of VM. You can use Vinchin Backup & Recovery to easily create incremental backup for KVM VM.
Create KVM snapshot with virsh command
Before you take KVM snapshot: Snapshot is supported in KVM environment when the virtual disk image is saved with qcow2 format rather than raw format. You can check the image format before taking KVM snapshot. If necessary, you can use QEMU-img to convert raw to qcow2.
In this section, virsh command is used in all the procedures.
Create KVM snapshot:
virsh snapshot-create kvm_guest_name
Check KVM snapshot list:
virsh snapshot-list kvm_guest_name
Recover KVM VM from snapshot:
virsh snapshot-revert kvm_guest_name snapshot_name
Delete KVM snapshot:
virsh snapshot-delet kvm_guest_name snapshot_name
Take KVM snapshot with virt-manager
Most mainstream virtualization vendors will provide graphic virtual machine manager to let users easily manage virtual environment and for KVM environment it is virt-manager.
After you start virt-manager > find and select the virtual machine you would like to take snapshot > in user session screen, click the double-monitor icon on the top > then you can take a snapshot for this KVM VM
Backup KVM virtual machine with Vinchin Backup & Recovery
Virtual machine managers can't provide professional backup solution for virtual environment. That's also the reason why VMware abandoned VMware Data Recovery. To protect KVM virtual environment with comprehensive solution, you can choose Vinchin Backup & Recovery.
Vinchin Backup & Recovery supports multiple virtualization platforms like Red Hat Virtualization, oVirt, OpenStack, Oracle Linux KVM, etc. and the backup procedures are also very simple. You just need to add hosts to Vinchin backup system and then you can backup VMs agentlessly. Vinchin Backup & Recovery provides many backup strategies like schedule, data encryption, data compression, ect. to let you backup VM in every way you wish.
You can also use Vinchin Backup & Recovery as virtual machine manager to move VM in heterogeneous virtual environment. The operations are simple because you can finish these steps in a user-friendly web-based console. Just click the button to get the installation package and start a 60-day full-featured free trial.
Sum Up
KVM is a popular virtualization solution. It is used in Red Hat Virtualziation, oVirt, OpenStack, Oracle Linux KVM, etc. To manage KVM virtual environment, one of the jobs of IT administrators is guaranteeing the good performance of VM. Snapshot can quickly recover VM to the previous state, so it is a useful skill for IT administrators.
In this post, the methods of using virsh command and virt-manager to create KVM snapshot are introduced. IT administrators can use them to take snapshot for KVM virtual machine and recover VM when it is needed.
Business continuity is important. To protect your virtual environment with well-rounded disaster recovery solution. You can trust Vinchin Backup & Recovery. Don't miss the free trial.
Share on: