qemush/qemu/launchers/spice

30 lines
672 B
Text
Raw Normal View History

2024-03-11 22:25:03 +01:00
#!/usr/bin/env perl
use warnings;
use strict;
my @launchers_chain = ("kvm");
if (defined $ENV{'QEMUSH_BASE'}) {
@launchers_chain = split ",", $ENV{'QEMUSH_BASE'};
}
my $base = shift @launchers_chain;
$ENV{'QEMUSH_BASE'} = join ",", @launchers_chain;
chomp(my $socket_path = `pathof spice`);
my @command = (
$base,
"-vga", "qxl",
"-chardev", "spicevmc,id=vdagent,debug=0,name=vdagent",
"-device", "virtio-serial",
"-device", "virtserialport,chardev=vdagent,name=com.redhat.spice.0",
"-spice", "unix=on,addr=${socket_path},disable-ticketing=on",
"-audiodev", "spice,id=snd0",
@ARGV
);
print "+ exec ", join(" ", @command), "\n";
exit;
exec @command;