id = 986 title = "vpc images are created with bigger virtual size than required" state = "opened" created_at = "2022-04-16T12:22:47.018Z" closed_at = "n/a" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/986" host-os = "Debian 11 (and as well Windows)" host-arch = "x86_64" qemu-version = "qemu-img version 5.2.0 (Debian 1:5.2+dfsg-11+deb11u1) (and as well self-compiled qemu-img v2.12.1, v6.2.94)" guest-os = "n/a" guest-arch = "n/a" description = """Required virtual size is 895287296, but as qemu-img info reports it is 895426560.""" reproduce = """1. qemu-img create -f vpc img1.vpc 895287296 2. qemu-img info img1.vpc""" additional = """Converting back and forth is not possible as a result ``` $ qemu-img info openSUSE-Leap-15.3-GNOME-Live-x86_64-Media.iso image: openSUSE-Leap-15.3-GNOME-Live-x86_64-Media.iso file format: raw virtual size: 854 MiB (895287296 bytes) disk size: 854 MiB $ qemu-img create -f vpc img1.vpc 895287296 Formatting 'img1.vpc', fmt=vpc size=895287296 $ qemu-img convert -n \\ -f raw openSUSE-Leap-15.3-GNOME-Live-x86_64-Media.iso \\ -O vpc img1.vpc $ qemu-img compare \\ -f raw openSUSE-Leap-15.3-GNOME-Live-x86_64-Media.iso \\ -F vpc img1.vpc Warning: Image size mismatch! Images are identical. $ qemu-img create -f raw img2.raw 895287296 Formatting 'img2.raw', fmt=raw size=895287296 $ qemu-img convert -n -f vpc img1.vpc -O raw img2.raw qemu-img: output file is smaller than input file $ qemu-img compare \\ -f raw openSUSE-Leap-15.3-GNOME-Live-x86_64-Media.iso \\ -F raw img2.raw Content mismatch at offset 0! ```"""