Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 PVE/QemuMigrate.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index a2fa17a..616632c 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -473,6 +473,7 @@ sub phase2 {
 
     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';
@@ -484,6 +485,15 @@ sub phase2 {
                 $vmid = $1;
             }
        });
+
+       my $configout = "";
+       foreach my $opt (keys %$conf) {
+           next if $opt eq 'snapshots';
+           next if $opt eq 'pending';
+           $configout .= "$opt: $conf->{$opt}\n";
+       }
+       my $cmdwrite = [@{$self->{rem_ssh}}," /bin/echo -e \"$configout\" > 
/etc/pve/qemu-server/$targetvmid.conf"];
+        PVE::Tools::run_command($cmdwrite);
     }
 
     $self->log('info', "starting VM $vmid on remote node '$self->{node}'");
-- 
2.1.4

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to