virtiofsd enablement
Bug #1892736 reported by
Christian Ehrhardt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is a try for groovy, but ok to postpong to 21.04 if major blockers show up.
Now that we soon have qemu 5.0 and libvirt >6.2 in Groovy it makes sense to look at virtiosd.
There will be apparmor needs
https:/
And probably more as we are testing.
TODO - recheck if all prereqs now exist
Background:
http://
Related branches
~paelzer/ubuntu/+source/libvirt:fix-initial-6.6.0-groovy
Merged
into
ubuntu/+source/libvirt:ubuntu/groovy-devel
at
revision 55b91b396b353da31d8cb9af9478f04a41aee1e6
- Andreas Hasenack: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 266 lines (+238/-0)4 files modifieddebian/changelog (+9/-0)
debian/patches/series (+2/-0)
debian/patches/ubuntu-aa/lp-1892736-apparmor-allow-libvirtd-to-call-virtiofsd.patch (+59/-0)
debian/patches/ubuntu/lp-1892826-Revert-m4-virt-xdr-rewrite-XDR-check.patch (+168/-0)
CVE References
To post a comment you must log in.
Tried:
sudo mkdir -p /var/lib/ libvirt/ virtiofsd/ test1
Get a guest and add 'passthrough' > lib/libvirt/ virtiofsd/ test1'/ >
<filesystem type='mount' accessmode=
<driver type='virtiofs'/>
<binary xattr='on'>
<lock posix='on' flock='on'/>
</binary>
<source dir='/var/
<target dir='test1'/>
</filesystem>
due to: /libvirt. org/kbase/ virtiofs. html as a pre-req for shared memory 'shared' />
"error: unsupported configuration: virtiofs requires one or more NUMA nodes"
This is explained in https:/
Due to that also add something like:
<numa>
<cell id='0' cpus='0-7' memory='2' unit='GiB' memAccess=
</numa>
There are more details for memory backing in the link above, but this gets you working.
In the guest one can then mount that via:
$ sudo mount -t virtiofs test1 /mnt
Runs fine on the host and provides transparent host FS access
in a more modern fashion than 9p.
ubuntu@ node-horsea: ~$ systemctl status libvirtd system/ libvirtd. service; enabled; vendor preset: enabled) admin.socket /libvirt. org slice/libvirtd. service file=/var/ lib/libvirt/ dnsmasq/ default. conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper file=/var/ lib/libvirt/ dnsmasq/ default. conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper file=/var/ lib/libvirt/ dnsmasq/ net-host- only-bridge- for-dpdk- 1.conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper file=/var/ lib/libvirt/ dnsmasq/ net-host- only-bridge- for-dpdk- 1.conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper file=/var/ lib/libvirt/ dnsmasq/ net-host- only-bridge- for-dpdk- 2.conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper file=/var/ lib/libvirt/ dnsmasq/ net-host- only-bridge- for-dpdk- 2.conf --leasefile-ro --dhcp- script= /usr/lib/ libvirt/ libvirt_ leaseshelper
├ ─1499817 /usr/sbin/libvirtd
├ ─1518124 /usr/lib/ qemu/virtiofsd --fd=28 -o source= /var/lib/ libvirt/ virtiofsd/ test1,xattr, flock,posix_ lock
└ ─1518142 /usr/lib/ qemu/virtiofsd --fd=28 -o source= /var/lib/ libvirt/ virtiofsd/ test1,xattr, flock,posix_ lock
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/
Active: active (running) since Wed 2020-08-26 06:11:11 UTC; 24min ago
TriggeredBy: ● libvirtd-
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https:/
Main PID: 1499817 (libvirtd)
Tasks: 159 (limit: 32768)
Memory: 63.1M
CGroup: /system.
├─ 1355 /usr/sbin/dnsmasq --conf-
├─ 1356 /usr/sbin/dnsmasq --conf-
├─ 41956 /usr/sbin/dnsmasq --conf-
├─ 41957 /usr/sbin/dnsmasq --conf-
├─ 41984 /usr/sbin/dnsmasq --conf-
├─ 41985 /usr/sbin/dnsmasq --conf-
Works fine with the apparmor rule applied.
I also tried to remove the rule and can confirm the former error.
$ virsh start virtiofsd-guest
error: Failed to start domain virtiofsd-guest
error: internal error: virtiofsd died unexpectedly
[173492.773174] audit: type=1400 audit(159842393 2.651:6460) : apparmor="DENIED" operation="exec" profile="libvirtd" name="/ usr/lib/ qemu/virtiofsd" pid=1518858 comm="rpc-worker" reque...