Commit f7b706cb authored by Dietmar Maurer's avatar Dietmar Maurer

use new AbstractMigrate.pm

parent 25ac9b68
...@@ -320,6 +320,16 @@ __PACKAGE__->register_method({ ...@@ -320,6 +320,16 @@ __PACKAGE__->register_method({
my $cmd = ['vzctl', '--skiplock', '--quiet', 'set', $vmid, my $cmd = ['vzctl', '--skiplock', '--quiet', 'set', $vmid,
'--applyconfig_map', 'name', '--save']; '--applyconfig_map', 'name', '--save'];
run_command($cmd); run_command($cmd);
# reload config
my $conf = PVE::OpenVZ::load_config($vmid);
# and initialize quota
my $disk_quota = $conf->{disk_quota}->{value};
if (!defined($disk_quota) || ($disk_quota != 0)) {
my $cmd = ['vzctl', '--skiplock', 'quotainit', $vmid];
run_command($cmd);
}
}; };
return $rpcenv->fork_worker($param->{restore} ? 'vzrestore' : 'vzcreate', return $rpcenv->fork_worker($param->{restore} ? 'vzrestore' : 'vzcreate',
...@@ -1037,7 +1047,9 @@ __PACKAGE__->register_method({ ...@@ -1037,7 +1047,9 @@ __PACKAGE__->register_method({
my $realcmd = sub { my $realcmd = sub {
my $upid = shift; my $upid = shift;
PVE::OpenVZMigrate::migrate($target, $targetip, $vmid, $param->{online});
PVE::OpenVZMigrate->migrate($target, $targetip, $vmid, $param);
return; return;
}; };
......
This diff is collapsed.
...@@ -292,17 +292,7 @@ Ext.define('PVE.KVMConsole', { ...@@ -292,17 +292,7 @@ Ext.define('PVE.KVMConsole', {
vm_command("resume"); vm_command("resume");
} }
}, },
{ // Note: no migrate here, because we can't display migrate log
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{ {
text: gettext('Console'), text: gettext('Console'),
handler: function() { handler: function() {
...@@ -397,17 +387,8 @@ Ext.define('PVE.OpenVZConsole', { ...@@ -397,17 +387,8 @@ Ext.define('PVE.OpenVZConsole', {
}); });
} }
}, },
{ // Note: no migrate here, because we can't display migrate log
text: gettext('Migrate'), // and openvz migrate does not work if console is open
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'openvz',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
{ {
text: gettext('Console'), text: gettext('Console'),
handler: function() { handler: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment