I was re-checking this so you have something to compare to - for a start
on Noble as that is what I had around right away.
Creating a new guest and then adding the entries outlined in [1], which
AFAICS are the same or close to what you use, worked for me. The biggest
difference might be that I created the initial guest with uvtool and not
with virt-manager - so maybe there is a difference due to that. I didn't
have memfd, but set it and it still works.
For me it worked all the way through, I could mount in the guest and see
the files the host created.
I'll show the full resulting guest XML so you can modify this or yours
to make them more similar until you spot which setting it is that is
different for you.
<domain type='kvm'>
<name>n-vfs</name>
<uuid>c8a2d87a-cf68-4fc3-b764-44ad42c3cc0d</uuid>
<metadata>
<uvt:ssh_known_hosts
xmlns:uvt="https://launchpad.net/uvtool/libvirt/1">ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABgQDnBsRqCWshHzLDUUNhKsTPBcv439ICPorIUBBNZJJw2VVI3ZuhGVNqnCjfo9vnVW7O4RB6FX5OLSAVcfTNIXH78INYeddfrRfjWhBuuampTOFFVCKZzFuhve5PSCtHbHNetgPaFCYNYgcJoTH4i2WzMD8fGe4k9qfT2XjIefAnL+C9q4Vq/ua+QSw7AwrItcn2MpUJEZq4yYM1J9fPQFyrWDK/wclrM7WSK7oFwZtFAl9yXRtLctgG4tGXXKtTs4cgU1ICdGWHgKGGnQN8qGaEJEjVa/K6R3YkB6nE6PpGQsn9x6cLSwh3vQ4W9ARxvu9iR9puhskuR71+c3g+x1r1mVU+oObgWHJMetvO6eyAed7048Hs1IC1E4gpUz6ovdL8z+/0eafXNAzEQwtxZKWRdkRElyUxPM+T+vhiDeMU3TpPqsYd/H02U/CwC/fK0JiqP+u57CvZcq2QttwEfVuxQXbyFGWhJKwt+tMlaZLVTRan9xEkeiioeLJ/ef5xDMU=
root@localhost
ssh-dss
AAAAB3NzaC1kc3MAAACBAPK3lJajowat8F2B8GHYegGYjc+EkrBYxPKLpkJAu+QTK3H7HpCoJhGQyVm1nil8E4wu8zHjVKLffnTCzlXh5N2F7GGG2jbHFsA0G0O6bt1R/jOG+SX8UxflxZF2xsbNU2+fhfiJ70a2B5zUZb3sKdp5J4W43GDJYLD2PBRsDoPBAAAAFQCKWJdq6u95dlsrihGdsFtQ87wX7wAAAIEA3asr/Algw/wldllS3y8bqBpXN1P5kS2uh8gkCOya1x+mxP/7yDtwnVKfv09JxNY0tmbuW+NgrxsglwINPlqnH1Uy/vn8sb0JStBXFhtRjCX1I5mVHmdBZPe6Blnc7nW9dmDsrs1BrX4f1jVAnIiJFR1j78IRNgZegKLHd8XyUOgAAACAARJ8P/BIjLJiROXaeC5PtJ5+TWYdiXPSpkoLKHgYWoj6dppZt+JFcbkCP9/nLHJpc0VcNLMH3DjQBYJio/GTPet34EBU6vTsvPYciY8cdy69ZMeAWynKOtaBmTv42R/g+FxzYgi6WREEN/YYY3oSQZgtNLI+bpqdJ6HdMpWgYGg=
root@localhost
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCrZEdoAYnKO1YjpeyeYs3JnMGHzucpJYWOLsrPgBY3xynjfP+S1L/AQcIfaj+Q9YkOYTbk21B54n7oA6svueKs=
root@localhost
ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAIFRpkEK6EWF7Z8Bg+iGmuzMV6wyAO4TmJXlgjQPet9cj
root@localhost
</uvt:ssh_known_hosts>
</metadata>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<memoryBacking>
<source type='memfd'/>
<access mode='shared'/>
</memoryBacking>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-noble'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/uvtool/libvirt/images/n-vfs.qcow'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00'
function='0x0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/uvtool/libvirt/images/n-vfs-ds.qcow'/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00'
function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00'
function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f'
function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'
multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x2'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0x13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0x14'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x6'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00'
function='0x0'/>
</controller>
<filesystem type='mount' accessmode='passthrough'>
<driver type='virtiofs'/>
<source dir='/var/guests/n-vfs'/>
<target dir='myfs'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00'
function='0x0'/>
</filesystem>
<interface type='network'>
<mac address='52:54:00:d7:ce:9b'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00'
function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<graphics type='spice' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<audio id='1' type='spice'/>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x0'/>
</video>
<watchdog model='itco' action='reset'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00'
function='0x0'/>
</memballoon>
</devices>
</domain>
BTW: The dir I share was created with nothing special, just sudo mkdir
-p /var/guests/n-vfs and then putting a test file in there.
Log of fsd in the good case:
sudo cat /var/log/libvirt/qemu/n-vfs-fs0-virtiofsd.log
[2024-10-09T08:10:32Z WARN virtiofsd] Use of deprecated option format '-o':
Please specify options without it (e.g., '--cache auto' instead of '-o
cache=auto')
[2024-10-09T08:10:32Z INFO virtiofsd] Waiting for vhost-user socket
connection...
[2024-10-09T08:10:33Z INFO virtiofsd] Client connected, servicing requests
So it is fine on Noble (which is the new version that also made Debian close
the bug),
let me check if I can find a jammy system to try that as well...
[1]: https://ubuntu.com/server/docs/libvirt
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2083988
Title:
Cannot use virtiofs on Ubuntu 22.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2083988/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs