qemush/qemu/launchers/9p

25 lines
554 B
Text
Raw Permalink Normal View History

2024-03-11 22:02:49 +01:00
#!/usr/bin/env perl
use warnings;
use strict;
2024-03-11 15:11:02 +01:00
2024-03-11 22:02:49 +01:00
my @launchers_chain = ("kvm");
2024-03-11 15:11:02 +01:00
2024-03-11 22:02:49 +01:00
if (defined $ENV{'QEMUSH_BASE'}) {
@launchers_chain = split ",", $ENV{'QEMUSH_BASE'};
}
my $base = shift @launchers_chain;
$ENV{'QEMUSH_BASE'} = join ",", @launchers_chain;
chomp(my $shared_folder = `pathof shared`);
2024-03-11 22:02:49 +01:00
my @command = (
$base,
"-fsdev", "local,security_model=passthrough,id=fsdev0,path=${shared_folder}",
2024-03-11 22:02:49 +01:00
"-device", "virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared",
@ARGV
);
print "+ exec ", join(" ", @command), "\n";
exec @command;