• Stefan Hajnoczi's avatar
    qemu-img: Add --backing-chain option to info command · 9699bf0d
    Stefan Hajnoczi authored
    
    
    The qemu-img info --backing-chain option enumerates the backing file
    chain.  For example, for base.qcow2 <- snap1.qcow2 <- snap2.qcow2 the
    output becomes:
    
      $ qemu-img info --backing-chain snap2.qcow2
      image: snap2.qcow2
      file format: qcow2
      virtual size: 100M (104857600 bytes)
      disk size: 196K
      cluster_size: 65536
      backing file: snap1.qcow2
      backing file format: qcow2
    
      image: snap1.qcow2
      file format: qcow2
      virtual size: 100M (104857600 bytes)
      disk size: 196K
      cluster_size: 65536
      backing file: base.qcow2
      backing file format: qcow2
    
      image: base.qcow2
      file format: qcow2
      virtual size: 100M (104857600 bytes)
      disk size: 136K
      cluster_size: 65536
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    9699bf0d
qemu-img.c 57.2 KB