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}”


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

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

For more information and examples read the full article



Submit a Comment

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

Recent posts

VDI: The most secure environment for hybrid working

Today is Data Privacy Day. The purpose of this date is to raise awareness and promote privacy and data protection best practices. It was initiated by the European Commission, the Council of Europe, and the Data Protection authorities of the European Union’s member states. Their main goal was to drive attention to the importance of privacy, user data protection, and compliance of the General Data Protection Regulation (RGPD). It is a regulation characterized by significant fines for non-compliance since its implementation in 2018.

How to avoid issues with virtual machines

Virtualization comes with a wide range of benefits for organizations. It helps cut IT costs and reduces downtime while increasing efficiency and productivity. It also increases the resiliency of networks, primarily when disasters occur, and promotes more green-friendly operations.

However, using virtual machines also comes with a set of downsides. Information security may get compromised, workloads mixed up, separation duties lost, among other issues. It is vital to know how you can get over these problems, and that’s what this article will discuss.

Let’s get started.


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

Skip to content