0

I'm on Fedora Linux 42.20250824.0 (Sway Atomic), running libvirt version 11.0.0, qemu-img version 9.2.4 (qemu-9.2.4-1.fc42) and virt-manager version 5.0.0, all installed as layered packages.

Using only virt-manager, I created a virtual machine and, at each step of my project, created a new external snapshot (which is the default type of snapshot for this version of virt-manager). Each snapshot was created with the VM completely shut down. At different times in the project, I had to revert to the current active snapshot. I ended up with 25 different snapshots.

Today, I tried running the VM and was presented with the following error:

# virsh start lab 
error: Failed to start domain 'lab'
error: internal error: failed to parse JSON: nesting too deep

I searched on Google but wasn't able to find a solution for this particular problem. I then proceeded to investigate the possibility that 25 external snapshots was too much to handle for this version of libvirt.

Following this guide from libvirt, I tried to run the following command:

# virsh blockcommit lab vda --wait --verbose
error: invalid argument: could not find base image in chain for 'vda'

This error makes no sense to me, because from what I understand from the following commands, there is a base image in the chain for 'vda':

# virsh domblklist lab
 Target   Source
---------------------------------------------------------
 vda      /var/lib/libvirt/images/lab.1756116206
 sda      -
# qemu-img info --backing-chain /var/lib/libvirt/images/lab.1756116206 
image: /var/lib/libvirt/images/lab.1756116206
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 216 KiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755873260
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1756116206
    protocol type: file
    file length: 216 KiB (220672 bytes)
    disk size: 216 KiB

image: /var/lib/libvirt/images/lab.1755873260
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 20.4 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755867452
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755873260
    protocol type: file
    file length: 20.4 GiB (21891448832 bytes)
    disk size: 20.4 GiB

image: /var/lib/libvirt/images/lab.1755867452
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 6.06 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.template-ready
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755867452
    protocol type: file
    file length: 6.06 GiB (6511656960 bytes)
    disk size: 6.06 GiB

image: /var/lib/libvirt/images/lab.template-ready
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 16.5 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.prereqs
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.template-ready
    protocol type: file
    file length: 16.5 GiB (17696751616 bytes)
    disk size: 16.5 GiB

image: /var/lib/libvirt/images/lab.prereqs
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 56.5 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755788922
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.prereqs
    protocol type: file
    file length: 56.5 GiB (60627877888 bytes)
    disk size: 56.5 GiB

image: /var/lib/libvirt/images/lab.1755788922
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 3.68 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755720336
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755788922
    protocol type: file
    file length: 3.68 GiB (3950051328 bytes)
    disk size: 3.68 GiB

image: /var/lib/libvirt/images/lab.1755720336
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 9.55 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755698841
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755720336
    protocol type: file
    file length: 9.55 GiB (10249568256 bytes)
    disk size: 9.55 GiB

image: /var/lib/libvirt/images/lab.1755698841
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 26.4 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.websrv
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755698841
    protocol type: file
    file length: 26.4 GiB (28341895168 bytes)
    disk size: 26.4 GiB

image: /var/lib/libvirt/images/lab.websrv
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 17.6 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.app1
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.websrv
    protocol type: file
    file length: 17.6 GiB (18863620096 bytes)
    disk size: 17.6 GiB

image: /var/lib/libvirt/images/lab.app1
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 8.57 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.config
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.app1
    protocol type: file
    file length: 8.57 GiB (9205186560 bytes)
    disk size: 8.57 GiB

image: /var/lib/libvirt/images/lab.config
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 25.6 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755527251
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.config
    protocol type: file
    file length: 25.6 GiB (27504672768 bytes)
    disk size: 25.6 GiB

image: /var/lib/libvirt/images/lab.1755527251
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 27.3 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755513546
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755527251
    protocol type: file
    file length: 28.2 GiB (30260199424 bytes)
    disk size: 27.3 GiB

image: /var/lib/libvirt/images/lab.1755513546
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 7.43 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755504820
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755513546
    protocol type: file
    file length: 7.43 GiB (7973240832 bytes)
    disk size: 7.43 GiB

image: /var/lib/libvirt/images/lab.1755504820
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 25.3 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.extensions
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755504820
    protocol type: file
    file length: 25.3 GiB (27115257856 bytes)
    disk size: 25.3 GiB

image: /var/lib/libvirt/images/lab.extensions
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 63.7 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1755111543
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.extensions
    protocol type: file
    file length: 63.7 GiB (68366303232 bytes)
    disk size: 63.7 GiB

image: /var/lib/libvirt/images/lab.1755111543
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 307 MiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1754849159
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1755111543
    protocol type: file
    file length: 307 MiB (321650688 bytes)
    disk size: 307 MiB

image: /var/lib/libvirt/images/lab.1754849159
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 13.8 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.packages
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1754849159
    protocol type: file
    file length: 13.8 GiB (14794686464 bytes)
    disk size: 13.8 GiB

image: /var/lib/libvirt/images/lab.packages
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 15.5 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.pack03
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.packages
    protocol type: file
    file length: 15.5 GiB (16626810880 bytes)
    disk size: 15.5 GiB

image: /var/lib/libvirt/images/lab.pack03
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 22.1 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.pack02
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.pack03
    protocol type: file
    file length: 22.1 GiB (23683596288 bytes)
    disk size: 22.1 GiB

image: /var/lib/libvirt/images/lab.pack02
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 34.4 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.pack01
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.pack02
    protocol type: file
    file length: 34.4 GiB (36904042496 bytes)
    disk size: 34.4 GiB

image: /var/lib/libvirt/images/lab.pack01
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 5.05 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.memory
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.pack01
    protocol type: file
    file length: 5.05 GiB (5422710784 bytes)
    disk size: 5.05 GiB

image: /var/lib/libvirt/images/lab.memory
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 8.79 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.pre-inst
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.memory
    protocol type: file
    file length: 8.79 GiB (9437511680 bytes)
    disk size: 8.79 GiB

image: /var/lib/libvirt/images/lab.pre-inst
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 19.7 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.1754779273
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.pre-inst
    protocol type: file
    file length: 19.7 GiB (21183266816 bytes)
    disk size: 19.7 GiB

image: /var/lib/libvirt/images/lab.1754779273
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 135 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.stable
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.1754779273
    protocol type: file
    file length: 135 GiB (145155096576 bytes)
    disk size: 135 GiB

image: /var/lib/libvirt/images/lab.stable
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 6.16 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/lab.qcow2
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.stable
    protocol type: file
    file length: 6.16 GiB (6616383488 bytes)
    disk size: 6.16 GiB

image: /var/lib/libvirt/images/lab.qcow2
file format: qcow2
virtual size: 1.46 TiB (1610612736000 bytes)
disk size: 3.55 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: true
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/lab.qcow2
    protocol type: file
    file length: 1.47 TiB (1610858758144 bytes)
    disk size: 3.55 GiB

Walking back the chain, it seems to me that there is a base image: /var/lib/libvirt/images/lab.qcow2

I also tried a different approach:

# virsh blockcommit --domain lab --path /var/lib/libvirt/images/lab.1756116206 --top /var/lib/libvirt/images/lab.1756116206 --base /var/lib/libvirt/images/lab.qcow2 --wait --verbose
error: invalid argument: could not find image '/var/lib/libvirt/images/lab.qcow2' beneath '/var/lib/libvirt/images/lab.1756116206' in chain for 'vda'

Each snapshot was an intermediate step, I don't really mind losing them to have a cleaner backing chain. However, I'd really like to be able to consolidate everything in a single image in order not to lose any of my work.

The situation now is less than ideal, I can start the VM if I revert to an older snapshot (for example /var/lib/libvirt/images/lab.1755720336), but:

  • it makes me lose several day's worth of work
  • since I don't know what caused the problem, there is no way for me to avoid it coming back
  • I can't delete snapshots. When I try to do it:
# virsh snapshot-delete lab pack01
error: Failed to delete snapshot pack01
error: internal error: failed to parse JSON: nesting too deep

Can someone please guide me in further troubleshooting to better understand what happened and eventually find a way to save as much work as possible?

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.