Commit f7b706cb authored by Dietmar Maurer's avatar Dietmar Maurer

use new AbstractMigrate.pm

parent 25ac9b68
......@@ -320,6 +320,16 @@ __PACKAGE__->register_method({
my $cmd = ['vzctl', '--skiplock', '--quiet', 'set', $vmid,
'--applyconfig_map', 'name', '--save'];
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',
......@@ -1037,7 +1047,9 @@ __PACKAGE__->register_method({
my $realcmd = sub {
my $upid = shift;
PVE::OpenVZMigrate::migrate($target, $targetip, $vmid, $param->{online});
PVE::OpenVZMigrate->migrate($target, $targetip, $vmid, $param);
return;
};
......
This diff is collapsed.
......@@ -292,17 +292,7 @@ Ext.define('PVE.KVMConsole', {
vm_command("resume");
}
},
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
// Note: no migrate here, because we can't display migrate log
{
text: gettext('Console'),
handler: function() {
......@@ -397,17 +387,8 @@ Ext.define('PVE.OpenVZConsole', {
});
}
},
{
text: gettext('Migrate'),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'openvz',
nodename: me.nodename,
vmid: me.vmid
});
win.show();
}
},
// Note: no migrate here, because we can't display migrate log
// and openvz migrate does not work if console is open
{
text: gettext('Console'),
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