diff --git a/XenAdmin/Commands/Controls/MigrateVMToolStripMenuItem.cs b/XenAdmin/Commands/Controls/MigrateVMToolStripMenuItem.cs index 9733907c1..6947dfba6 100644 --- a/XenAdmin/Commands/Controls/MigrateVMToolStripMenuItem.cs +++ b/XenAdmin/Commands/Controls/MigrateVMToolStripMenuItem.cs @@ -89,6 +89,10 @@ namespace XenAdmin.Commands private static bool CanExecute(VM vm) { + if (vm.Connection != null && vm.Connection.IsConnected) + if (Helpers.FeatureForbidden(vm.Connection, Host.RestrictInterPoolMigrate)) + return false; + if (vm != null && !vm.is_a_template && !vm.Locked) { if(Helpers.TampaOrGreater(vm.Connection)) diff --git a/XenModel/XenAPI-Extensions/Host.cs b/XenModel/XenAPI-Extensions/Host.cs index 3cca34004..92c535081 100644 --- a/XenModel/XenAPI-Extensions/Host.cs +++ b/XenModel/XenAPI-Extensions/Host.cs @@ -426,6 +426,16 @@ namespace XenAPI return h._RestrictExportResourceData; } + private bool _RestrictInterPoolMigrate + { + get { return BoolKeyPreferTrue(license_params, "restrict_xen_motion"); } + } + + public static bool RestrictInterPoolMigrate(Host h) + { + return h._RestrictInterPoolMigrate; + } + private bool _RestrictReadCaching { get { return BoolKeyPreferTrue(license_params, "restrict_read_caching"); }