Forrest logo
tool overview
On this page you find all important commands for the CLI tool qemu-img. If the command you are looking for is missing please ask our AI.

qemu-img

QEMU-img is a command-line tool used for manipulating virtual disk images in QEMU and KVM virtualization environments. It is a versatile tool that offers a wide range of functionalities for image format conversion, resizing, compression, and creation.

With QEMU-img, you can convert disk images from one format to another, such as raw, VMDK, VHD, and Qcow2. It supports both reading and writing operations on various image formats, making it useful for disk image management and migration.

One of the significant features of qemu-img is the ability to resize disk images easily. You can expand or shrink the size of an image, allowing you to adjust the storage capacity as per your requirements.

The tool also supports compression, allowing you to reduce the size of disk images without any impact on the virtual machine's performance. This is particularly useful when transferring or storing images on limited disk space.

QEMU-img enables you to create new disk images from scratch. You can specify the format, size, and other parameters to customize the image according to your needs.

It provides options for taking snapshots of disk images, allowing you to capture the state of a virtual machine at a specific point in time. These snapshots can be useful for backup purposes or for quickly reverting to a previous state.

QEMU-img supports various advanced features like encryption, which allows you to encrypt and decrypt disk images to ensure data security and privacy.

The tool also has options for repairing disk images, allowing you to fix any inconsistencies or errors within the image file.

QEMU-img is cross-platform and compatible with multiple operating systems, including Windows, Linux, and macOS, making it a reliable choice for managing virtual disk images across different environments.

Overall, qemu-img is a powerful, flexible, and efficient command-line tool that enables administrators and users to manage and manipulate virtual disk images effectively.

List of commands for qemu-img:

  • qemu-img:tldr:1a346 qemu-img: Dump the allocation state of every sector of the specified disk image.
    $ qemu-img map ${image_name-img}
    try on your machine
    explain this command
  • qemu-img:tldr:7c73d qemu-img: Convert a VMware .vmdk disk image to a KVM .qcow2 disk image.
    $ qemu-img convert -f ${vmdk} -O ${qcow2} ${filename-foo-vmdk} ${filename-foo-qcow2}
    try on your machine
    explain this command
  • qemu-img:tldr:8bc51 qemu-img: Increase or decrease image size.
    $ qemu-img resize ${image_name-img} ${gigabytes}G
    try on your machine
    explain this command
  • qemu-img:tldr:b484c qemu-img: Create disk image with a specific size (in gigabytes).
    $ qemu-img create ${image_name-img} ${gigabytes}G
    try on your machine
    explain this command
  • qemu-img:tldr:e33b8 qemu-img: Show information about a disk image.
    $ qemu-img info ${image_name-img}
    try on your machine
    explain this command
tool overview