VMmanager Knowledge Base

"Creating snapshot failed" error

Description

An error appears in the interface when attempting to create a VM backup.

To view details:

  1. In the Virtual Machines section, select the VM.
  2. Enter ParametersInformationLast 10 events.
  3. Click on the Failed status in the Event column. This displays the Task Information tab with the detailed error text:
Unhandled exception: Error message: Creating snapshot fail
Command exited with message error: unsupported configuration: nothing selected for snapshot 

The error occurs if the VM snapshot already exists.

Solution

To resolve the issue:

  1. Connect to the node server via SSH.
  2. Get a list of virtual disks:

    virsh domblklist <libvirt_domain>
    Comment

    Example output:

    # virsh domblklist 2698_test-alma8
    Target Source
    ------------------------------------------------
    vda /vm2/2711_test-alma8.2698_test-alma8_snapshot

    The output shows that the VM already has a snapshot.

  3. Compare the modification dates of the virtual disk master file and the snapshot. Determine which file was modified later:

    stat <virtual_disk_file>
    stat <snapshot_file>

    Example output for the virtual disk master file. See Modify value:

    # stat /vm2/2711_test-alma8
     File: /vm2/2711_test-alma8
     Size: 2419458048 Blocks: 4725400 IO Block: 4096 regular file
    Device: 902h/2306d Inode: 23330831 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 107/ qemu) Gid: ( 107/ qemu)
    Access: 2023-11-20 12:04:25.826960539 +0200
    Modify: 2023-11-20 12:06:15.420142110 +0200
    Change: 2023-11-20 12:06:15.420142110 +0200
     Birth: 2023-10-26 08:38:45.574566975 +0300
  4. The next steps depend on which file was modified later and is relevant:
    • if the disk file is more relevant, delete the snapshot:

      rm <snapshot_file>
    • If the more relevant file is the snapshot file:

      1. Merge the file data:

        virsh blockcommit <libvirt_domain> vda --active --verbose --pivot
        Comment

        Example reply for a successful merge:

        # virsh blockcommit 2698_test-alma8 vda --active --verbose --pivot
        Block commit: [100 %]
        Successfully pivoted
      2. Delete the snapshot:

        rm <snapshot_file>
  5. Repeat the backup.