Difference between revisions of "Qemu-img"
Jump to navigation
Jump to search
(Created page with "<code>qemu-img</code><ref>https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html</ref> allows you to create, convert and modify images offline, It can handle all im...") |
|||
Line 2: | Line 2: | ||
− | * <code>[[ | + | * <code>[[qemu-img info]]</code><ref>https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html</ref> |
− | * <code>[[ | + | * <code>[[qemu-img bench]]</code> |
− | * <code>[[ | + | * <code>[[qemu-img create]]</code> |
** <code>qemu-img create -f qcow2 MY_IMAGE_NAME.img 3G</code> | ** <code>qemu-img create -f qcow2 MY_IMAGE_NAME.img 3G</code> | ||
** <code>qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts=on MY_IMAGE_NAME.img</code> | ** <code>qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts=on MY_IMAGE_NAME.img</code> |
Revision as of 09:36, 2 January 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 3G
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 convert
qemu-img check
qemu-img check -r all
qemu-img resize YOUR_IMAGE.qcow2 +SIZE
[4] (KVM/Extend LVM on qcow2 images)[5]
qemu-img snapshot
(See also:lvcreate --snapshot
for LVM snapshots)
Activities
See also
virt-install
python script- virt-manager
- https://en.wikibooks.org/w/index.php?title=QEMU/Images
Source: wikiversity
- ↑ https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html
- ↑ https://manpages.debian.org/testing/qemu-utils/qemu-img.1.en.html
- ↑ http://libguestfs.org/virt-sysprep.1.html#copying-and-cloning
- ↑ https://maunium.net/blog/resizing-qcow2-images/
- ↑ https://serverfault.com/questions/324281/how-do-you-increase-a-kvm-guests-disk-space
Advertising: