Questo contenuto non è disponibile nella lingua selezionata.

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
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat