Signed-off-by: Alexandre Derumier <aderum...@odiso.com> --- PVE/QemuMigrate.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 71af817..a2fa17a 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -471,6 +471,21 @@ sub phase2 { my $conf = $self->{vmconf}; + if ($self->{opts}->{externalcluster}) { + $self->log('info', "Creating a new VM on remote external node '$self->{node}'"); + ## start on remote node + my $cmdcreate = [@{$self->{rem_ssh}}]; + push @$cmdcreate , 'qm', 'create'; + + PVE::Tools::run_command($cmdcreate, outfunc => sub { + my $line = shift; + + if ($line =~ m/^vm (\d+) created$/) { + $vmid = $1; + } + }); + } + $self->log('info', "starting VM $vmid on remote node '$self->{node}'"); my $raddr; -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel