Difference between revisions of "Qemu-img"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
* <code>[[qemu-img info]] MY_image-qcow.qcow2</code><ref>https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html</ref>  
 
* <code>[[qemu-img info]] MY_image-qcow.qcow2</code><ref>https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html</ref>  
 +
** <code>[[qemu-img info]] --backing-chain MY_image-qcow.qcow2</code>
 +
 +
 
* <code>[[qemu-img bench]]</code>
 
* <code>[[qemu-img bench]]</code>
  

Revision as of 13:32, 4 February 2020

qemu-img[1] allows you to create, convert and modify images offline, It can handle all image formats supported by QEMU.



  • qemu-img create
    • qemu-img create -f qcow2 MY_IMAGE_NAME.img
    • qemu-img create -f raw MY_IMAGE_NAME.img
    • qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts=on MY_IMAGE_NAME.img
lazy_refcounts=on Reference count updates are postponed with the goal of avoiding metadata I/O and improving performance. Particularly interesting with cache=writethrough.
  • Create a snapshot: qemu-img create -f qcow2 -o backing_file=original snapshot.qcow[3]
  • qemu-img snapshot (See also: lvcreate --snapshot for LVM snapshots)


Activities

Related commands

See also

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Source: wikiversity

Advertising: