Creating snapshots in KVM

by | Sep 27, 2016

Before upgrading a virtual machine, it is recommended to make a snapshot to be able to revert a Domain/VM to a snapshot in case an error occurs during the upgrading process. There is a command to create a snapshot of a Virtual Machine (VM) while it is running.

KVM supports both live and normal snapshots, but you should keep in mind that the snapshot must always base on qcow2 type disk and that snapshots are only supported in KVM VM Host servers, thay can’t be created within KVM VM. A snapshot can also be created (disk and RAM) from arguments. In both cases, one of these commands must be used:

qemu-img command. It should never be used to modify images in use by a running virtual machine or any other process. The machine must be always in shutdown state to use this command.

virsh command. It is the main interface to manage virsh guest domains including KVM.

In this tutorial we’re using the second alternative, virsh command.

Syntax: This command can create a snapshot from a XML file using virsh snapshot-create or directly from a set of options using dvirsh snapshot-create-as command. Syntax is: virsh snapshot-create-as –domain {VM-NAME} –name “{SNAPSHOT-NAME}”

Where:

–domain {VM-NAME}: Domain name/VM name/id/uuid

–name “{SNAPSHOT-NAME}”: Name of snapshot

For more information and examples read the full article

SHARE

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent posts

On-premises vs. cloud: Which is better for your business?

The choice of technology infrastructure is crucial for the growth and competitiveness of businesses. This article analyzes the advantages and disadvantages of “on-premises” and “cloud computing” models, focusing on aspects such as costs, scalability, security, and management.

Archives


Stay up to date with all the news from UDS ENTERPRISE through our social networks. Follow us!

Skip to content