Bug 2025944
| Summary: | Compile libguestfs with ./configure --enable-appliance-format-auto to allow for qcow2-format fixed appliances | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Richard W.M. Jones <rjones> |
| Component: | libguestfs | Assignee: | Virtualization Maintenance <virt-maint> |
| Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.0 | CC: | afrosi, berrange, extras-qa, lersek, rjones, virt-maint, xiaodwan, yoguo |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libguestfs-1.46.0-5.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1967166 | Environment: | |
| Last Closed: | 2022-05-17 12:28:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1967166 | ||
| Bug Blocks: | |||
|
Description
Richard W.M. Jones
2021-11-23 12:55:00 UTC
*** Bug 2024152 has been marked as a duplicate of this bug. *** Reproducer: $ cd /var/tmp $ libguestfs-make-fixed-appliance appliance $ ls -l appliance total 304916 -rw-r--r--. 1 rjones rjones 6039040 Nov 23 12:32 initrd -rwxr-xr-x. 1 rjones rjones 10971128 Nov 23 12:32 kernel -rw-r--r--. 1 rjones rjones 978 Nov 23 12:32 README.fixed -rw-r--r--. 1 rjones rjones 4294967296 Nov 23 12:32 root The following command should work (as it's using the raw-format root appliance). This is not the reproducer, just a sanity check that libguestfs + appliance is working: $ LIBGUESTFS_PATH=$PWD/appliance libguestfs-test-tool The following commands convert the root appliance to qcow2 format and repeat the test: $ qemu-img convert -f raw appliance/root.raw -O qcow2 appliance/root $ file appliance/root appliance/root: QEMU QCOW2 Image (v3), 4294967296 bytes $ LIBGUESTFS_PATH=$PWD/appliance libguestfs-test-tool That command will fail when trying to mount the root filesystem, just after loading modules. Verified with package:
libguestfs-1.46.0-5.el9.x86_64
Steps:
1. On rhel9 host
$ cd /var/tmp
$ libguestfs-make-fixed-appliance appliance
$ ls -l appliance
total 305836
-rw-r--r--. 1 yoguo yoguo 6039040 Nov 23 22:59 initrd
-rwxr-xr-x. 1 yoguo yoguo 10972216 Nov 23 22:59 kernel
-rw-rw-r--. 1 yoguo yoguo 978 Nov 23 22:59 README.fixed
-rw-r--r--. 1 yoguo yoguo 4294967296 Nov 23 22:59 root
$ LIBGUESTFS_PATH=$PWD/appliance libguestfs-test-tool
...
===== TEST FINISHED OK =====
$ mv appliance/root appliance/root.raw
$ qemu-img convert -f raw appliance/root.raw -O qcow2 appliance/root
$ file appliance/root
appliance/root: QEMU QCOW2 Image (v3), 4294967296 bytes
$ LIBGUESTFS_PATH=$PWD/appliance libguestfs-test-tool
...
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ -U
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /var/tmp/appliance/root
libguestfs: parse_json: qemu-img info JSON output:\n{\n "virtual-size": 4294967296,\n "filename": "/var/tmp/appliance/root",\n "cluster-size": 65536,\n "format": "qcow2",\n "actual-size": 299962368,\n "format-specific": {\n "type": "qcow2",\n "data": {\n "compat": "1.1",\n "compression-type": "zlib",\n "lazy-refcounts": false,\n "refcount-bits": 16,\n "corrupt": false,\n "extended-l2": false\n }\n },\n "dirty-flag": false\n}\n\n
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/appliance/root,backing_fmt=qcow2
libguestfs: command: run: \ /tmp/libguestfsJQ1mE2/overlay2.qcow2
Formatting '/tmp/libguestfsJQ1mE2/overlay2.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 backing_file=/var/tmp/appliance/root backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
...
===== TEST FINISHED OK =====
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: libguestfs), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2317 |