How to Create, Revert and Delete KVM Virtual machine (domain) snapshot with virsh command

5 Responses

  1. sampath says:

    Thanks dude for the article.

  2. Giri says:

    Lets say you have 3 snapshots, A B and C, taken in that order (thats C taken after B taken after A) with C as the current snapshot. If I want to delete the snapshots A and B, will the command still work. If yes, do you see potential problems of doing these?

  3. Samanta Ujjal says:

    hi ,
    if i destroy the vm Can i recover it from the snapahot

  4. shirish says:

    Not able to merge snapshot to existing disk

    **KVM and qemu RPM info :-**
    [[email protected]_rhel ~]# rpm -qa | grep -i qemu

    [[email protected]_rhel ~]# virsh snapshot-list –domain centos7.0
    Name Creation Time State
    testVM2-firstSNAP35 2019-08-08 13:22:11 -0400 shutoff
    testVM2-firstSNAP36 2019-08-08 13:24:48 -0400 shutoff
    testVM2-firstSNAP37 2019-08-08 13:27:13 -0400 shutoff

    [[email protected]_rhel ~]# virsh snapshot-info –domain centos7.0 –snapshotname testVM2-firstSNAP37
    Name: testVM2-firstSNAP37
    Domain: centos7.0
    Current: yes
    State: shutoff
    Location: external
    Parent: –
    Children: 0
    Descendants: 0
    Metadata: yes

    **if VM is shutdown :-**

    [[email protected]_rhel ~]# virsh blockcommit centos7.0 vda –active –verbose –pivot
    error: Requested operation is not valid: domain is not running

    **if VM is Running :-**
    [[email protected]_rhel ~]# virsh blockcommit centos7.0 vda –active –verbose –pivot
    error: unsupported configuration: online commit not supported with this QEMU binary

    • Pradeep Kumar says:

      QEMU libraries are old that’s why online commit is not possible in your current qemu library, You need to install QEMU 2.1 ( and above), libvirt-1.2.9 (and above)

Leave a Reply

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