private bool IsVmExportable(VM vm)
        {
            if (!vm.is_a_real_vm)
                return false;

            if (!vm.Show(Properties.Settings.Default.ShowHiddenVMs))
                return false;

            if (vm.power_state != vm_power_state.Halted && vm.power_state != vm_power_state.Suspended)
                return false;

            if (vm.Locked)
                return false;

            return vm.allowed_operations != null && vm.allowed_operations.Contains(vm_operations.export);
        }
Beispiel #2
0
 private bool VMWanted(VM vm, Host host)
 {
     return vm.is_a_real_vm && vm.Show(Properties.Settings.Default.ShowHiddenVMs) && vm.Home() == host;
 }
Beispiel #3
0
        private static bool VmShouldBeVisible(VM vm)
        {
            if (XenAdminConfigManager.Provider.ObjectIsHidden(vm.opaque_ref))
                return false;

            return vm.is_a_real_vm && vm.Show(Properties.Settings.Default.ShowHiddenVMs) && !vm.IsBeingCreated;
        }