Bug 1718727
Summary: | Committing changes to the backing file over NBD fails with reopening files not supported | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Tingting Mao <timao> |
Component: | qemu-kvm | Assignee: | Maxim Levitsky <mlevitsk> |
Status: | CLOSED ERRATA | QA Contact: | Tingting Mao <timao> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | aliang, coli, jinzhao, juzhang, ngu, qzhang, timao, virt-maint, zhenyzha |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-4.1.0-18.module+el8.1.1+5150+45ce6c40 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-02-04 18:28:48 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: |
Description
Tingting Mao
2019-06-10 06:01:31 UTC
Patch posted upstream https://lists.gnu.org/archive/html/qemu-block/2019-09/msg01448.html Also note that bugs 1465320 and 1713647, and maybe more are duplicate of this. Verified this bug as below. Tested with: qemu-kvm-4.1.0-18.module+el8.1.1+5150+45ce6c40 kernel-4.18.0-147.0.3.el8_1 Steps: 1. Export a image with OS already via qemu-nbd. # qemu-nbd -f raw base.img -p 9000 -t 2.Create snapshot based on the image. # qemu-img create -f qcow2 -b nbd:localhost:9000 sn.qcow2 3. Check snapshot info. # qemu-img info sn.qcow2 image: sn.qcow2 file format: qcow2 virtual size: 20 GiB (21474836480 bytes) disk size: 196 KiB cluster_size: 65536 backing file: nbd:localhost:9000 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false 4. Boot guest from the snapshot file. # /usr/libexec/qemu-kvm \ -name 'guest-rhel7.7' \ -machine q35 \ -nodefaults \ -vga qxl \ -object secret,id=sec0,data=base \ -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ -device pcie-root-port,port=0x12,chassis=3,id=pcx.3,bus=pcie.0,addr=0x2.0x2 \ -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \ -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \ -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \ -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \ -device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \ -blockdev driver=file,cache.direct=off,cache.no-flush=off,node-name=my_file1,filename=sn.qcow2\ -blockdev driver=qcow2,file=my_file1,node-name=my \ -device virtio-blk-pci,id=virtio_blk_pci1,drive=my,bus=pcx.3,addr=0x0 \ -vnc :1 \ -m 8192 \ -smp 4 \ -netdev tap,id=hostnet0,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:56:00:00:00:07,bus=pci.5,addr=0x0 \ -chardev socket,id=qmp_id_qmpmonitor1,path=/home/qmp-sock2,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -boot order=cdn,once=c,menu=off,strict=off \ -enable-kvm \ -monitor stdio 5. Write a tmp file in the guest. (guest)# dd if=/dev/urandom of=fsn bs=1M count=1024. 6. Shutdown the guest, and commit the snapshot file. # qemu-img commit -f qcow2 sn.qcow2 -p (100.00/100%) Image committed. 7. Boot from the base image over nbd. # /usr/libexec/qemu-kvm \ -name 'guest-rhel7.7' \ -machine q35 \ -nodefaults \ -vga qxl \ -object secret,id=sec0,data=base \ -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ -device pcie-root-port,port=0x12,chassis=3,id=pcx.3,bus=pcie.0,addr=0x2.0x2 \ -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \ -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \ -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \ -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \ -device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \ -blockdev driver=nbd,cache.direct=off,cache.no-flush=off,node-name=my_file1,server.host=localhost,server.port=9000,server.type=inet \ -blockdev driver=raw,file=my_file1,node-name=my \ -device virtio-blk-pci,id=virtio_blk_pci1,drive=my,bus=pcx.3,addr=0x0 \ -vnc :1 \ -m 8192 \ -smp 4 \ -netdev tap,id=hostnet0,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:56:00:00:00:07,bus=pci.5,addr=0x0 \ -chardev socket,id=qmp_id_qmpmonitor1,path=/home/qmp-sock2,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -boot order=cdn,once=c,menu=off,strict=off \ -enable-kvm \ -monitor stdio Result: As above. After step6, commit successfully. And after step7, there is the tmp file created in step5. Plus, tried to commit changes in the snapshot file to a specific image in the backing-chain, it works well, too. 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, 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-2020:0404 |