-
Bug
-
Resolution: Unresolved
-
Undefined
-
rhel-10.0
-
libvirt-10.10.0-7.el10
-
No
-
Important
-
rhel-sst-virt-tools
-
ssg_virtualization
-
None
-
Dev ack
-
False
-
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
-
All
-
None
akalenyu has been integrating the shared_filesystems feature introduced with RHEL-70637 into KubeVirt and has discovered that it doesn't work as expected there.
This is what the domain XML for a KubeVirt guest looks like:
<disk type='file' device='disk' model='virtio-non-transitional'> <driver name='qemu' type='raw' cache='none' error_policy='stop' discard='unmap'/> <source file='/var/run/kubevirt-private/vmi-disks/disk0/disk.img' index='2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='ua-dv-disk'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </disk>
And this is how the QEMU driver is configured to take advantage of the shared_filesystems feature:
shared_filesystems = [ "/var/run/kubevirt-private/vmi-disks/disk0" ]
Everything looks sane, and yet migration fails with:
{"component":"virt-launcher","level":"info","msg":"Check if path /var/run/kubevirt-private/vmi-disks/disk0/disk.img with FS magic 61267 is shared","pos":"virFileIsSharedFSType:3625","subcomponent":"libvirt","thread":"28","timestamp":"2025-02-12T16:27:02.871000Z"} {"component":"virt-launcher","level":"error","msg":"Unsafe migration: Migration without shared storage is unsafe","pos":"qemuMigrationSrcIsSafe:1754","subcomponent":"libvirt","thread":"28","timestamp":"2025-02-12T16:27:02.871000Z"}
After some joint analysis, we figured out that the issue stems from the fact that the virt-launcher container, just like all modern Linux systems, contains the following symlink:
$ ls -l /var/run lrwxrwxrwx. 1 root root 6 Oct 24 16:49 /var/run -> ../run
So the canonical form for any /var/run/foo path is /run/foo; notably, all paths in the shared_filesystems configuration value undergo canonicalization, while the disk path itself doesn't. Knowing this, it becomes obvious why the feature doesn't work as expected. Luckily, the fix is just as obvious.
- is related to
-
RHEL-70637 [rhel-10]Libvirt introduction of shared storage check skip
-
- Release Pending
-