Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-50542

Guest with virtiofs device can be saved, but can not be restored from the state file

    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      Please provide the package NVR for which bug is seen:

      libvirt-10.5.0-4.el9.x86_64
      qemu-kvm-9.0.0-7.el9.x86_64
      virtiofsd-1.11.1-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce:

      1. Check the virtiofsd capabilities
      # /usr/libexec/virtiofsd --print-capabilities
      {
        "type": "fs",
        "features": [
          "migrate-precopy",
          "separate-options"
        ]
      }
      

       

      2. Prepare a guest with following xml snippet

      # virsh dumpxml lizhu --xpath //memoryBacking
      <memoryBacking>
        <source type="memfd"/>
        <access mode="shared"/>
      </memoryBacking>
       
      # virsh dumpxml lizhu --xpath //filesystem
      <filesystem type="mount" accessmode="passthrough">
        <driver type="virtiofs" queue="512"/>
        <binary path="/usr/libexec/virtiofsd" xattr="on"/>
        <source dir="/var/tmp/mount_tag0"/>
        <target dir="mount_tag0"/>
        <alias name="ua-1667b440-49cb-11ef-839a-e4434bdc8b94"/>
        <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
      </filesystem>
      

       
      3. start the guest

      # virsh start lizhu
      Domain 'lizhu' started
      

       
      4. Login the guest, mount virtiofs

      [Guest OS]# mount -t virtiofs mount_tag0 /mnt
      

       
      5. Save the guest

      # virsh managedsave lizhu
      Domain 'lizhu' state saved by libvirt
      

       
      6. Check the state file

      # ll /var/lib/libvirt/qemu/save/lizhu.save
      -rw-------. 1 root root 757513180 Jul 25 04:20 /var/lib/libvirt/qemu/save/lizhu.save
      

       
      7. Try to restore

      # virsh start lizhu
      error: Failed to start domain 'lizhu'
      error: internal error: QEMU unexpectedly closed the monitor (vm='lizhu'): 2024-07-25T08:21:45.361362Z qemu-kvm: Error loading back-end state of virtio-user-fs device /machine/peripheral/ua-1667b440-49cb-11ef-839a-e4434bdc8b94/virtio-backend (tag: "mount_tag0"): Back-end failed to process its internal state
      2024-07-25T08:21:45.361431Z qemu-kvm: Failed to load vhost-user-fs-backend:back-end
      2024-07-25T08:21:45.361439Z qemu-kvm: error while loading state for instance 0x0 of device '0000:00:02.6:00.0/vhost-user-fs'
      2024-07-25T08:21:45.363119Z qemu-kvm: load of migration failed: Input/output error
      

       
      Expected result:
      Guest with virtiofs device can be restored. Or if guest with virtiofs device can not be saved for now, it should report error when users try to save guest.

              hreitz@redhat.com Hanna Czenczek
              rhn-support-lizhu Lili Zhu
              virt-maint virt-maint
              Tingting Mao Tingting Mao
              Votes:
              0 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated: