Difference between revisions of "Qemu-img info"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>[[qemu-img]]<ref>https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html#OPTIONS</ref> info IMAGE_NAME</code>
+
{{lowercase}}
 +
<code>qemu-img info YOUR_FILENAME</code> give information about the disk image (YOUR_FILENAME)
 +
* https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html#OPTIONS
 +
 
 +
== Options ==
 +
--backing-chain If a disk image has a backing file chain will enumerate information about [[backing files]] in a [[disk image]] chain
 +
 
 +
== Examples ==
 +
 
 +
  $ qemu-img info test.vmdk
 +
  (VMDK) image open: flags=0x2 filename=test.vmdk
 +
  image: test.vmdk
 +
  file format: vmdk
 +
  [[virtual size]]: 20M (20971520 bytes)
 +
  disk size: 17M
 +
 
 +
 
 +
qemu-img info root_default.img
 +
image: root_default.img
 +
file format: qcow2
 +
virtual size: 41 GiB (44023414784 bytes)
 +
disk size: 1.14 GiB
 +
cluster_size: 65536
 +
[[backing file]]: [[/var/lib/libvirt/images/]]fedora-VAGRANTSLASH-32-cloud-base_vagrant_box_image_32.20200422.0.img
 +
backing file format: qcow2
 +
Format specific information:
 +
    compat: 0.10
 +
    refcount bits: 16
  
<pre>
 
$ qemu-img info test.vmdk
 
(VMDK) image open: flags=0x2 filename=test.vmdk
 
image: test.vmdk
 
file format: vmdk
 
virtual size: 20M (20971520 bytes)
 
disk size: 17M
 
</pre>
 
  
 
<pre>
 
<pre>
Line 32: Line 51:
 
     corrupt: false
 
     corrupt: false
 
</pre>
 
</pre>
 +
 +
qemu-img info MY_image-qcow.qcow2
 +
image: MY_image-qcow.qcow2
 +
file format: qcow2
 +
virtual size: 250G (268435456000 bytes)
 +
disk size: 250G
 +
cluster_size: 65536
 +
Format specific information:
 +
    compat: 1.1
 +
    lazy refcounts: true
 +
    refcount bits: 16
 +
    corrupt: false
  
 
<pre>
 
<pre>
Line 46: Line 77:
 
     corrupt: false
 
     corrupt: false
 
</pre>
 
</pre>
 +
 +
 +
qemu-img info IMAGE.qcow2
 +
qemu-img: Could not open 'IMAGE.qcow2': Failed to get shared "write" lock
 +
Is another process using the image?
 +
  
 
Notes:
 
Notes:
Line 54: Line 91:
 
* <code>[[qemu-img resize]]</code>
 
* <code>[[qemu-img resize]]</code>
 
* <code>[[qemu-img convert]]</code>
 
* <code>[[qemu-img convert]]</code>
 +
* <code>[[qemu-img check]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 15:23, 3 October 2021

qemu-img info YOUR_FILENAME give information about the disk image (YOUR_FILENAME)

Options[edit]

--backing-chain If a disk image has a backing file chain will enumerate information about backing files in a disk image chain

Examples[edit]

 $ qemu-img info test.vmdk 
 (VMDK) image open: flags=0x2 filename=test.vmdk
 image: test.vmdk
 file format: vmdk
 virtual size: 20M (20971520 bytes)
 disk size: 17M


qemu-img info root_default.img
image: root_default.img
file format: qcow2
virtual size: 41 GiB (44023414784 bytes)
disk size: 1.14 GiB
cluster_size: 65536
backing file: /var/lib/libvirt/images/fedora-VAGRANTSLASH-32-cloud-base_vagrant_box_image_32.20200422.0.img
backing file format: qcow2
Format specific information:
    compat: 0.10
    refcount bits: 16


 $ qemu-img info image-qcow.qcow2
 image: image-qcow.qcow2
 file format: qcow2
 virtual size: 10G (10737418240 bytes)
 disk size: 136K
 cluster_size: 65536
 $ qemu-img info MY_image-qcow.qcow2
 image: MY_image-qcow.qcow2
 file format: qcow2
 virtual size: 20G (21474836480 bytes)
 disk size: 7.5G
 cluster_size: 65536
 Format specific information:
    compat: 1.1
    lazy refcounts: true
    refcount bits: 16
    corrupt: false
qemu-img info MY_image-qcow.qcow2
image: MY_image-qcow.qcow2
file format: qcow2
virtual size: 250G (268435456000 bytes)
disk size: 250G
cluster_size: 65536
Format specific information:
   compat: 1.1
   lazy refcounts: true
   refcount bits: 16
   corrupt: false
 $ qemu-img info --backing-chain MY_image-qcow.qcow2
 image: MY_image-qcow.qcow2
 file format: qcow2
 virtual size: 20G (21474836480 bytes)
 disk size: 7.5G
 cluster_size: 65536
 Format specific information:
    compat: 1.1
    lazy refcounts: true
    refcount bits: 16
    corrupt: false


qemu-img info IMAGE.qcow2
qemu-img: Could not open 'IMAGE.qcow2': Failed to get shared "write" lock
Is another process using the image?


Notes:

  • Encrypted information will be available only if the image is encrypted (The use of encryption in qcow and qcow2 images is considered to be flawed by modern cryptography standards)
  • Snapshot list: A list of all internal snapshots

Related commands[edit]

See also[edit]

Advertising: