[pve-devel] [PATCH qemu-server v16 4/12] control: add virtiofsd as runtime dependency for qemu-server
Markus Frank
m.frank at proxmox.com
Mon Apr 7 12:59:04 CEST 2025
On 2025-04-07 12:43, Thomas Lamprecht wrote:
> Am 04.04.25 um 18:08 schrieb Markus Frank:
>> Signed-off-by: Markus Frank <m.frank at proxmox.com>
>> Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>
>> Reviewed-by: Laurențiu Leahu-Vlăducu <l.leahu-vladucu at proxmox.com
>> Reviewed-by: Daniel Kral <d.kral at proxmox.com>
>> Tested-by: Laurențiu Leahu-Vlăducu <l.leahu-vladucu at proxmox.com>
>> Tested-by: Daniel Kral <d.kral at proxmox.com>
>> Tested-by: Lukas Wagner <l.wagner at proxmox.com>
>> ---
>> no changes in v16
>>
>> debian/control | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/debian/control b/debian/control
>> index 196647dd..27925009 100644
>> --- a/debian/control
>> +++ b/debian/control
>> @@ -55,6 +55,7 @@ Depends: dbus,
>> socat,
>> swtpm,
>> swtpm-tools,
>> + virtiofsd,
>> ${misc:Depends},
>> ${perl:Depends},
>> ${shlibs:Depends},
>
> What about adding this as recommends? It would be still pulled in by
> default, user can opt out though, reducing the attack surface.
>
> Would your code handle the case where the executable does not exist
> with a somewhat nice error?
No, it does not.
But it can easily be added.
diff --git a/PVE/QemuServer/Virtiofs.pm b/PVE/QemuServer/Virtiofs.pm
index 5b948d57..6c9018e5 100644
--- a/PVE/QemuServer/Virtiofs.pm
+++ b/PVE/QemuServer/Virtiofs.pm
@@ -163,6 +163,9 @@ sub start_virtiofsd {
my $dir_cfg = PVE::Mapping::Dir::find_on_current_node($virtiofs->{dirid});
my $virtiofsd_bin = '/usr/libexec/virtiofsd';
+ if (! -f $virtiofsd_bin) {
+ print "virtiofsd is not installed. To use virtio-fs, install virtiofsd via apt.\n";
+ }
my $fd = $socket->fileno();
my $path = $dir_cfg->{path};
More information about the pve-devel
mailing list