How to create snapshot in Linux KVM VM/Domain

www.laut‮irut‬.com
How to create snapshot in Linux KVM VM/Domain

To create a snapshot of a Linux KVM virtual machine (VM) or domain, you can use the virsh command. virsh is a command-line tool for managing KVM domains (VMs).

Here is an example of how to create a snapshot of a KVM domain using virsh:

  1. Connect to the KVM host using ssh.

  2. List the available domains using the list command:

virsh list

This will display a list of the domains on the KVM host, along with their ID and state.

  1. Suspend the domain that you want to snapshot using the suspend command. Replace domain with the name or ID of the domain:
virsh suspend domain
  1. Create the snapshot using the snapshot-create-as command. Replace domain with the name or ID of the domain, and snapshotname with the desired name for the snapshot:
virsh snapshot-create-as domain snapshotname

This will create a snapshot of the domain with the specified name.

  1. To resume the domain, use the resume command:
virsh resume domain
Created Time:2017-10-28 21:39:01  Author:lautturi