mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 17:01:46 +00:00
migration: do not allow live-migration with clipboard=vnc
It is not yet supported for QEMU's vdagent device which is used for the VNC clipboard. The migration precondition API call will now treat the VNC clipboard as a local resource. Thus the GUI blocks migration and shows: "Can't migrate VM with local resources: clipboard=vnc" QemuMigrate's prepare function will also abort live migration early when using the VNC clipboard. Signed-off-by: Markus Frank <m.frank@proxmox.com> [FE: adapt commit message a bit] Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
d440f52417
commit
bb30eedfc6
@ -4376,6 +4376,11 @@ __PACKAGE__->register_method({
|
||||
PVE::QemuServer::check_local_resources($vmconf, 1);
|
||||
delete $missing_mappings_by_node->{$localnode};
|
||||
|
||||
my $vga = PVE::QemuServer::parse_vga($vmconf->{vga});
|
||||
if ($res->{running} && $vga->{'clipboard'} && $vga->{'clipboard'} eq 'vnc') {
|
||||
push $local_resources->@*, "clipboard=vnc";
|
||||
}
|
||||
|
||||
# if vm is not running, return target nodes where local storage/mapped devices are available
|
||||
# for offline migration
|
||||
if (!$res->{running}) {
|
||||
|
@ -255,6 +255,11 @@ sub prepare {
|
||||
}
|
||||
}
|
||||
|
||||
my $vga = PVE::QemuServer::parse_vga($conf->{vga});
|
||||
if ($running && $vga->{'clipboard'} && $vga->{'clipboard'} eq 'vnc') {
|
||||
die "VMs with 'clipboard' set to 'vnc' are not live migratable!\n";
|
||||
}
|
||||
|
||||
my $vollist = PVE::QemuServer::get_vm_volumes($conf);
|
||||
|
||||
my $storages = {};
|
||||
|
Loading…
Reference in New Issue
Block a user