Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

14.3. Comparing Images


Compare the contents of two specified image files (imgname1 and imgname2) with the qemu-img compare command. Optionally, specify the files' format types (fmt). The images can have different formats and settings.
By default, images with different sizes are considered identical if the larger image contains only unallocated or zeroed sectors in the area after the end of the other image. In addition, if any sector is not allocated in one image and contains only zero bytes in the other one, it is evaluated as equal. If you specify the -s option, the images are not considered identical if the image sizes differ or a sector is allocated in one image and is not allocated in the second one.
 # qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2qemu-img compare [-f fmt] [-F fmt] [-p] [-s] [-q] imgname1 imgname2
Copy to Clipboard Toggle word wrap
The qemu-img compare command exits with one of the following exit codes:
  • 0 - The images are identical
  • 1 - The images are different
  • 2 - There was an error opening one of the images
  • 3 - There was an error checking a sector allocation
  • 4 - There was an error reading the data
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat