Qemu-img: Difference between revisions
Jump to navigation
Jump to search
(→info) |
|||
Line 10: | Line 10: | ||
=Overview= | =Overview= | ||
qemu-img is a command-line tool used to create, format, convert, modify and verify [[Linux_Virtualization_Concepts#Virtual_Machine_Image|virtual machine images]] offline. It can handle all image formats supported by [[Linux_Virtualization_Concepts#Quick_Emulator_.28QEMU.29|QEMU]]. | qemu-img is a command-line tool used to create, format, convert, modify and verify [[Linux_Virtualization_Concepts#Virtual_Machine_Image|virtual machine images]] offline. It can handle all [[Linux_Virtualization_Concepts#Virtual_Machine_Image_Formats|image formats]] supported by [[Linux_Virtualization_Concepts#Quick_Emulator_.28QEMU.29|QEMU]]. | ||
{{Warn|qemu-img must not be used to modify images in use by a running virtual machine or any other process - this may destroy the image. If an image is queried while it is modified by another process may result in an inconsistent state.}} | {{Warn|qemu-img must not be used to modify images in use by a running virtual machine or any other process - this may destroy the image. If an image is queried while it is modified by another process may result in an inconsistent state.}} |
Revision as of 23:49, 28 June 2017
External
Internal
Overview
qemu-img is a command-line tool used to create, format, convert, modify and verify virtual machine images offline. It can handle all image formats supported by QEMU.
qemu-img must not be used to modify images in use by a running virtual machine or any other process - this may destroy the image. If an image is queried while it is modified by another process may result in an inconsistent state.
Sub-Commands
info
qemu info <filename>
qemu-img info /main-storage-pool/testvm-01.img
image: /main-storage-pool/testvm-01.img file format: qcow2 virtual size: 4.0G (4294967296 bytes) disk size: 1.3G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: true
check
Performs a consistency check of the virtual machine image file, if the format is "qcow2", "qed" or "vdi". The command output can be in either "human" or "json" format.
qemu-img check <filename>