mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-11 16:41:44 +00:00
cfg2cmd: fix serial-bus for spice foldersharing
Thanks to Gilberto Nunes for finding a bug where the VM would not start with foldersharing enabled and the qemu agent option disabled [0]. The cause was that the device org.spice-space.webdav.0 would not find a virtio-serial-bus in this situation. Since we always create a virtio-serial-bus for the spice vdagent it seems sensible to use that also for the foldersharing device by moving it in front of the other spice devices. [0]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039441.html Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
03b8d4a72d
commit
4d316a63c7
@ -4017,6 +4017,11 @@ sub config_to_command {
|
|||||||
my $pfamily = PVE::Tools::get_host_address_family($nodename);
|
my $pfamily = PVE::Tools::get_host_address_family($nodename);
|
||||||
my @nodeaddrs = PVE::Tools::getaddrinfo_all('localhost', family => $pfamily);
|
my @nodeaddrs = PVE::Tools::getaddrinfo_all('localhost', family => $pfamily);
|
||||||
die "failed to get an ip address of type $pfamily for 'localhost'\n" if !@nodeaddrs;
|
die "failed to get an ip address of type $pfamily for 'localhost'\n" if !@nodeaddrs;
|
||||||
|
|
||||||
|
push @$devices, '-device', "virtio-serial,id=spice$pciaddr";
|
||||||
|
push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent";
|
||||||
|
push @$devices, '-device', "virtserialport,chardev=vdagent,name=com.redhat.spice.0";
|
||||||
|
|
||||||
my $localhost = PVE::Network::addr_to_ip($nodeaddrs[0]->{addr});
|
my $localhost = PVE::Network::addr_to_ip($nodeaddrs[0]->{addr});
|
||||||
$spice_port = PVE::Tools::next_spice_port($pfamily, $localhost);
|
$spice_port = PVE::Tools::next_spice_port($pfamily, $localhost);
|
||||||
|
|
||||||
@ -4029,11 +4034,6 @@ sub config_to_command {
|
|||||||
my $spice_opts = "tls-port=${spice_port},addr=$localhost,tls-ciphers=HIGH,seamless-migration=on";
|
my $spice_opts = "tls-port=${spice_port},addr=$localhost,tls-ciphers=HIGH,seamless-migration=on";
|
||||||
$spice_opts .= ",streaming-video=$spice_enhancement->{videostreaming}" if $spice_enhancement->{videostreaming};
|
$spice_opts .= ",streaming-video=$spice_enhancement->{videostreaming}" if $spice_enhancement->{videostreaming};
|
||||||
push @$devices, '-spice', "$spice_opts";
|
push @$devices, '-spice', "$spice_opts";
|
||||||
|
|
||||||
push @$devices, '-device', "virtio-serial,id=spice$pciaddr";
|
|
||||||
push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent";
|
|
||||||
push @$devices, '-device', "virtserialport,chardev=vdagent,name=com.redhat.spice.0";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# enable balloon by default, unless explicitly disabled
|
# enable balloon by default, unless explicitly disabled
|
||||||
|
Loading…
Reference in New Issue
Block a user