qemush/qemu/launchers/spice

28 lines
666 B
Perl
Executable file

#!/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";
exec @command;