[TUTORIAL] virtiofsd in PVE 8.0.x

so I created my own Write-ups.
Thanks! i will take a look at these.

Nice, but the plugins seem a bit 'unmaintained'!
Yes my concerns exactly, though as they use the fuse/kernel on the host I have my hopes. One person on Reddit has been using it fine… either way I won’t make any assumptions.

I'm leaning towards this glusterfs-volume-plugin.
lol, nice find, that gluster plug-in has worked solidly and is also unmaintained..

next job move my docker VMs to proxmox, after that can implement,
 
Last edited:
  • Like
Reactions: Drallas
Hi there!
I wonder if this can be shared between VM's.
Let's break down:
1 - Suppose I have shared the mount point /test to VM1, which has Linux installed, using virtiofsd
2 - Now I wanna share the very same mount point /test to VM2, which has Windows 10/11 installed, using this method: virtio-fs in Windows VM

Is that doable?
Thanks

Yes that’s doable and one the reasons I’m looking into this solution.
 
  • Like
Reactions: Gilberto Ferreira
I am try it with Debian 12 as a client and get the error:
Code:
mount -t virtiofs mnt_local /mnt/local/
mount: /mnt/local: wrong fs type, bad option, bad superblock on mnt_local, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
Code:
qm showcm 100 --pretty
/usr/bin/kvm \
  -id 100 \
  -name 'teste,debug-threads=on' \
  -no-shutdown \
  -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server=on,wait=off' \
  -mon 'chardev=qmp,mode=control' \
  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
  -mon 'chardev=qmp-event,mode=control' \
  -pidfile /var/run/qemu-server/100.pid \
  -daemonize \
  -smbios 'type=1,uuid=f883b6a5-0251-4307-ae1a-387d721fa25d' \
  -smp '4,sockets=1,cores=4,maxcpus=4' \
  -nodefaults \
  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
  -vnc 'unix:/var/run/qemu-server/100.vnc,password=on' \
  -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt \
  -m 2048 \
  -object 'memory-backend-ram,id=ram-node0,size=2048M' \
  -numa 'node,nodeid=0,cpus=0-3,memdev=ram-node0' \
  -object 'iothread,id=iothread-virtioscsi0' \
  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
  -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' \
  -device 'vmgenid,guid=5dcb91da-2667-4cb5-a504-f595b08b001f' \
  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
  -chardev 'socket,path=/var/run/qemu-server/100.qga,server=on,wait=off,id=qga0' \
  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:94a44c69d09b' \
  -drive 'file=/var/lib/vz/template/iso/debian-12.0.0-amd64-netinst.iso,if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2' \
  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
  -drive 'file=/mnt/pve/VMS/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,cache=writeback,discard=on,format=qcow2,aio=io_urin
g,detect-zeroes=unmap' \
  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
  -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vho
st=on' \
  -device 'virtio-net-pci,mac=1E:58:8D:FE:B0:74,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
  -machine 'type=pc+pve0' \
  -object 'memory-backend-memfd,id=mem,size=2048M,share=on' \
  -numa 'node,memdev=mem' \
  -chardev 'socket,id=char0,path=/run/virtiofsd/100-mnt_local.sock' \
  -device 'vhost-user-fs-pci,chardev=char0,tag=mnt_local'
Code:
cat /mnt/pve/VMS/snippets/virtiofs.pl  
#!/usr/bin/perl

use strict;
use warnings;

my %associations = (
  100 => ['/mnt/local'],
  #  101 => ['/zpool/audio', '/zpool/games'],
);

use PVE::QemuServer;

use Template;
my $tt = Template->new;

print "GUEST HOOK: " . join(' ', @ARGV) . "\n";

my $vmid = shift;
my $conf = PVE::QemuConfig->load_config($vmid);
my $vfs_args_file = "/run/$vmid.virtfs";
my $virtiofsd_dir = "/run/";
my $DEBUG = 1;
my $phase = shift;

my $unit_tpl = "[Unit]
Description=virtiofsd filesystem share at [% share %] for VM %i
StopWhenUnneeded=true

[Service]
Type=simple
RuntimeDirectory=virtiofsd
PIDFile=/run/virtiofsd/.run.virtiofsd.%i-[% share_id %].sock.pid
ExecStart=/usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/%i-[% share_id %].sock --shared-dir [% share %] --cac
he=auto --announce-submounts --inode-file-handles=mandatory

[Install]
RequiredBy=%i.scope\n";

if ($phase eq 'pre-start') {
  print "$vmid is starting, doing preparations.\n";

  my $vfs_args = "-object memory-backend-memfd,id=mem,size=$conf->{memory}M,share=on -numa node,memdev=mem";
  my $char_id = 0;

  # TODO: Have removal logic. Probably need to glob the systemd directory for matching files.
  for (@{$associations{$vmid}}) {
    my $share_id = $_ =~ s/^\///r =~ s/\//_/gr;
    my $unit_name = 'virtiofsd-' . $share_id;
    my $unit_file = '/etc/systemd/system/' . $unit_name . '@.service';
    print "attempting to install unit $unit_name...\n";
    if (not -d $virtiofsd_dir) {
        print "ERROR: $virtiofsd_dir does not exist!\n";
    }
    else { print "DIRECTORY DOES EXIST!\n"; }

    if (not -e $unit_file) {
      $tt->process(\$unit_tpl, { share => $_, share_id => $share_id }, $unit_file)
        || die $tt->error(), "\n";
      system("/usr/bin/systemctl daemon-reload");
      system("/usr/bin/systemctl enable $unit_name\@$vmid.service");
    }
    system("/usr/bin/systemctl start $unit_name\@$vmid.service");
    $vfs_args .= " -chardev socket,id=char$char_id,path=/run/virtiofsd/$vmid-$share_id.sock";
    $vfs_args .= " -device vhost-user-fs-pci,chardev=char$char_id,tag=$share_id";
    $char_id += 1;
  }

  open(FH, '>', $vfs_args_file) or die $!;
  print FH $vfs_args;
  close(FH);

  print $vfs_args . "\n";
  if (defined($conf->{args}) && not $conf->{args} =~ /$vfs_args/) {
    print "Appending virtiofs arguments to VM args.\n";
    $conf->{args} .= " $vfs_args";
  } else {
    print "Setting VM args to generated virtiofs arguments.\n";
    print "vfs_args: $vfs_args\n" if $DEBUG;
    $conf->{args} = " $vfs_args";
  }
  PVE::QemuConfig->write_config($vmid, $conf);
}
elsif($phase eq 'post-start') {
  print "$vmid started successfully.\n";
  my $vfs_args = do {
    local $/ = undef;
    open my $fh, "<", $vfs_args_file or die $!;
    <$fh>;
  };

  if ($conf->{args} =~ /$vfs_args/) {
    print "Removing virtiofs arguments from VM args.\n";
    print "conf->args = $conf->{args}\n" if $DEBUG;
    print "vfs_args = $vfs_args\n" if $DEBUG;
    $conf->{args} =~ s/\ *$vfs_args//g;
    print $conf->{args};
    $conf->{args} = undef if $conf->{args} =~ /^$/;
    print "conf->args = $conf->{args}\n" if $DEBUG;
    PVE::QemuConfig->write_config($vmid, $conf) if defined($conf->{args});
  }
}
elsif($phase eq 'pre-stop') {
  #print "$vmid will be stopped.\n";
}
elsif($phase eq 'post-stop') {
  #print "$vmid stopped. Doing cleanup.\n";
} else {
  die "got unknown phase '$phase'\n";
}

exit(0);
Code:
systemctl status| grep virtiofs
           │ ├─system-virtiofsd\x2dmnt_local.slice
           │ │ └─virtiofsd-mnt_local@100.service
           │ │   ├─12382 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /mnt/l
ocal --cache=auto --announce-submounts --inode-file-handles=mandatory
           │ │   └─12385 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /mnt/l
ocal --cache=auto --announce-submounts --inode-file-handles=mandatory
               │ └─14676 grep virtiofs
 
follow up about last info
Code:
qm start 100
GUEST HOOK: 100 pre-start
100 is starting, doing preparations.
attempting to install unit virtiofsd-mnt_local...
DIRECTORY DOES EXIST!
-object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd/100-mnt_lo
cal.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
Setting VM args to generated virtiofs arguments.
vfs_args: -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd/
100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
Use of uninitialized value in concatenation (.) or string at /mnt/pve/VMS/snippets/virtiofs.pl line 97.
GUEST HOOK: 100 post-start
100 started successfully.
Removing virtiofs arguments from VM args.
conf->args = -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiof
sd/100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
vfs_args = -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd
/100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
conf->args =

Can't mount the tag

Code:
mount -t virtiofs mnt_local /mnt/local/
mount: /mnt/local: wrong fs type, bad option, bad superblock on mnt_local, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

I got this in dmesg

Code:
virtio-fs: tag <mnt_local> not found

Any help?
 
I am try it with Debian 12 as a client and get the error:
Code:
mount -t virtiofs mnt_local /mnt/local/
mount: /mnt/local: wrong fs type, bad option, bad superblock on mnt_local, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
Code:
qm showcm 100 --pretty
/usr/bin/kvm \
  -id 100 \
  -name 'teste,debug-threads=on' \
  -no-shutdown \
  -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server=on,wait=off' \
  -mon 'chardev=qmp,mode=control' \
  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
  -mon 'chardev=qmp-event,mode=control' \
  -pidfile /var/run/qemu-server/100.pid \
  -daemonize \
  -smbios 'type=1,uuid=f883b6a5-0251-4307-ae1a-387d721fa25d' \
  -smp '4,sockets=1,cores=4,maxcpus=4' \
  -nodefaults \
  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
  -vnc 'unix:/var/run/qemu-server/100.vnc,password=on' \
  -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt \
  -m 2048 \
  -object 'memory-backend-ram,id=ram-node0,size=2048M' \
  -numa 'node,nodeid=0,cpus=0-3,memdev=ram-node0' \
  -object 'iothread,id=iothread-virtioscsi0' \
  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
  -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' \
  -device 'vmgenid,guid=5dcb91da-2667-4cb5-a504-f595b08b001f' \
  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
  -chardev 'socket,path=/var/run/qemu-server/100.qga,server=on,wait=off,id=qga0' \
  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:94a44c69d09b' \
  -drive 'file=/var/lib/vz/template/iso/debian-12.0.0-amd64-netinst.iso,if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2' \
  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
  -drive 'file=/mnt/pve/VMS/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,cache=writeback,discard=on,format=qcow2,aio=io_urin
g,detect-zeroes=unmap' \
  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
  -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vho
st=on' \
  -device 'virtio-net-pci,mac=1E:58:8D:FE:B0:74,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
  -machine 'type=pc+pve0' \
  -object 'memory-backend-memfd,id=mem,size=2048M,share=on' \
  -numa 'node,memdev=mem' \
  -chardev 'socket,id=char0,path=/run/virtiofsd/100-mnt_local.sock' \
  -device 'vhost-user-fs-pci,chardev=char0,tag=mnt_local'
Code:
cat /mnt/pve/VMS/snippets/virtiofs.pl
#!/usr/bin/perl

use strict;
use warnings;

my %associations = (
  100 => ['/mnt/local'],
  #  101 => ['/zpool/audio', '/zpool/games'],
);

use PVE::QemuServer;

use Template;
my $tt = Template->new;

print "GUEST HOOK: " . join(' ', @ARGV) . "\n";

my $vmid = shift;
my $conf = PVE::QemuConfig->load_config($vmid);
my $vfs_args_file = "/run/$vmid.virtfs";
my $virtiofsd_dir = "/run/";
my $DEBUG = 1;
my $phase = shift;

my $unit_tpl = "[Unit]
Description=virtiofsd filesystem share at [% share %] for VM %i
StopWhenUnneeded=true

[Service]
Type=simple
RuntimeDirectory=virtiofsd
PIDFile=/run/virtiofsd/.run.virtiofsd.%i-[% share_id %].sock.pid
ExecStart=/usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/%i-[% share_id %].sock --shared-dir [% share %] --cac
he=auto --announce-submounts --inode-file-handles=mandatory

[Install]
RequiredBy=%i.scope\n";

if ($phase eq 'pre-start') {
  print "$vmid is starting, doing preparations.\n";

  my $vfs_args = "-object memory-backend-memfd,id=mem,size=$conf->{memory}M,share=on -numa node,memdev=mem";
  my $char_id = 0;

  # TODO: Have removal logic. Probably need to glob the systemd directory for matching files.
  for (@{$associations{$vmid}}) {
    my $share_id = $_ =~ s/^\///r =~ s/\//_/gr;
    my $unit_name = 'virtiofsd-' . $share_id;
    my $unit_file = '/etc/systemd/system/' . $unit_name . '@.service';
    print "attempting to install unit $unit_name...\n";
    if (not -d $virtiofsd_dir) {
        print "ERROR: $virtiofsd_dir does not exist!\n";
    }
    else { print "DIRECTORY DOES EXIST!\n"; }

    if (not -e $unit_file) {
      $tt->process(\$unit_tpl, { share => $_, share_id => $share_id }, $unit_file)
        || die $tt->error(), "\n";
      system("/usr/bin/systemctl daemon-reload");
      system("/usr/bin/systemctl enable $unit_name\@$vmid.service");
    }
    system("/usr/bin/systemctl start $unit_name\@$vmid.service");
    $vfs_args .= " -chardev socket,id=char$char_id,path=/run/virtiofsd/$vmid-$share_id.sock";
    $vfs_args .= " -device vhost-user-fs-pci,chardev=char$char_id,tag=$share_id";
    $char_id += 1;
  }

  open(FH, '>', $vfs_args_file) or die $!;
  print FH $vfs_args;
  close(FH);

  print $vfs_args . "\n";
  if (defined($conf->{args}) && not $conf->{args} =~ /$vfs_args/) {
    print "Appending virtiofs arguments to VM args.\n";
    $conf->{args} .= " $vfs_args";
  } else {
    print "Setting VM args to generated virtiofs arguments.\n";
    print "vfs_args: $vfs_args\n" if $DEBUG;
    $conf->{args} = " $vfs_args";
  }
  PVE::QemuConfig->write_config($vmid, $conf);
}
elsif($phase eq 'post-start') {
  print "$vmid started successfully.\n";
  my $vfs_args = do {
    local $/ = undef;
    open my $fh, "<", $vfs_args_file or die $!;
    <$fh>;
  };

  if ($conf->{args} =~ /$vfs_args/) {
    print "Removing virtiofs arguments from VM args.\n";
    print "conf->args = $conf->{args}\n" if $DEBUG;
    print "vfs_args = $vfs_args\n" if $DEBUG;
    $conf->{args} =~ s/\ *$vfs_args//g;
    print $conf->{args};
    $conf->{args} = undef if $conf->{args} =~ /^$/;
    print "conf->args = $conf->{args}\n" if $DEBUG;
    PVE::QemuConfig->write_config($vmid, $conf) if defined($conf->{args});
  }
}
elsif($phase eq 'pre-stop') {
  #print "$vmid will be stopped.\n";
}
elsif($phase eq 'post-stop') {
  #print "$vmid stopped. Doing cleanup.\n";
} else {
  die "got unknown phase '$phase'\n";
}

exit(0);
Code:
systemctl status| grep virtiofs
           │ ├─system-virtiofsd\x2dmnt_local.slice
           │ │ └─virtiofsd-mnt_local@100.service
           │ │   ├─12382 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /mnt/l
ocal --cache=auto --announce-submounts --inode-file-handles=mandatory
           │ │   └─12385 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /mnt/l
ocal --cache=auto --announce-submounts --inode-file-handles=mandatory
               │ └─14676 grep virtiofs
What’s the file system on the VM? Saw this too yesterday and then mace sure the disk was EXT4.
 
Last edited:
follow up about last info
Code:
qm start 100
GUEST HOOK: 100 pre-start
100 is starting, doing preparations.
attempting to install unit virtiofsd-mnt_local...
DIRECTORY DOES EXIST!
-object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd/100-mnt_lo
cal.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
Setting VM args to generated virtiofs arguments.
vfs_args: -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd/
100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
Use of uninitialized value in concatenation (.) or string at /mnt/pve/VMS/snippets/virtiofs.pl line 97.
GUEST HOOK: 100 post-start
100 started successfully.
Removing virtiofs arguments from VM args.
conf->args = -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiof
sd/100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
vfs_args = -object memory-backend-memfd,id=mem,size=2048M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/run/virtiofsd
/100-mnt_local.sock -device vhost-user-fs-pci,chardev=char0,tag=mnt_local
conf->args =

Can't mount the tag

Code:
mount -t virtiofs mnt_local /mnt/local/
mount: /mnt/local: wrong fs type, bad option, bad superblock on mnt_local, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

I got this in dmesg

Code:
virtio-fs: tag <mnt_local> not found

Any help?
Your script doesn’t have the mkdir script, not sure is related, but I added it to the .pl hook script in my GH Gist linked before.
 
For reference, how did you solve it?
I think I was doing a duplicated work.
I was edited the vm conf file to add the args line, 'till I realize that the hookscript do it automaticaly.
So I remove the args line from the vm conf file and then BUM!.
SEEMS TO BE SOLVED: Now I noticed that call the mountpoint from /etc/fstab are hanging the Debian 12 inside the VM.

And interestly enough I got multiple lines reference to virtfsd:
1000 ? Ss 0:00 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-local.sock --shared-dir /local
--cache=auto --announce-submounts --inode-file-handles=mandatory
1001 ? Ss 0:00 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /m
nt/local --cache=auto --announce-submounts --inode-file-handles=mandatory
1005 ? Sl 0:00 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-mnt_local.sock --shared-dir /m
nt/local --cache=auto --announce-submounts --inode-file-handles=mandatory
1006 ? Sl 0:00 /usr/libexec/virtiofsd --log-level debug --socket-path /run/virtiofsd/100-local.sock --shared-dir /local
--cache=auto --announce-submounts --inode-file-handles=mandatory
 
Last edited:
Update!
It's hangs if I reboot the VM.
If I do a stop/shutdown and then start if again, works fine!
But if I do a reboot inside the vm calling /sbin/reboot, it's hangs the mount point when system are back on line.
But if I do a reboot or reset from PVE WEB GUI works fine.

I check the logs
2023-09-23T14:41:42.098579-03:00 pve01 virtiofsd[3052]: [2023-09-23T17:41:42Z DEBUG virtiofsd::server] Received request: opcode=Init
(26), inode=0, unique=2, pid=0
2023-09-23T14:41:42.098627-03:00 pve01 virtiofsd[3052]: [2023-09-23T17:41:42Z DEBUG virtiofsd:: passthrough::mount_fd] Creating MountF
d: mount_id=296, mount_fd=22
2023-09-23T14:41:42.098669-03:00 pve01 virtiofsd[3052]: [2023-09-23T17:41:42Z DEBUG virtiofsd::server] Replying OK, header: OutHeader
{ len: 80, error: 0, unique: 2 }

Don't know if this help.

1695490650870.png
 
Last edited:
@a4ds5t @scyto or anybody else.

I am not a programmer at all, so I wonder how to write a pre or post phase in the perl file, in order to remove the args previously insert into vm config file?
Thanks for help me out.

Seems to me that already happens in the ‘post-start’ phase..

Perl:
PVE::QemuConfig->write_config($vmid, $conf) if defined($conf->{args});

But perhaps it fails regardless..
Hope to find time and energy to do some testing myself later in the evening.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!