/** * Return true if VM includes pinning configuration or if it is a high performance vm type */ private boolean isVmHpOrPinningConfigurationEnabled(VM vm, Set<Guid> vmsWithPinnedvNumaNodes) { return vm.getVmType() == VmType.HighPerformance || vm.isUsingCpuPassthrough() || (vm.getCpuPinning() != null && !vm.getCpuPinning().isEmpty()) || vmsWithPinnedvNumaNodes.contains(vm.getId()); } }
if (vm.getCpuPinning() != null) { _writer.writeElement(CPU_PINNING, vm.getCpuPinning());
if (vm.getCpuPinning() != null) { _writer.writeElement(CPU_PINNING, vm.getCpuPinning());
@Override public void templateWithVersion_SelectedItemChanged() { super.templateWithVersion_SelectedItemChanged(); getModel().setIsDisksAvailable(true); VmTemplate template = getModel().getTemplateWithVersion().getSelectedItem().getTemplateVersion(); if (template == null) { return; } boolean isLatestPropertyChanged = pool.isUseLatestVersion() != (template instanceof LatestVmTemplate); // template ID changed but latest is not set, as it would cause false-positives boolean isTemplateIdChangedSinceInit = !pool.getVmtGuid().equals(template.getId()) && !pool.isUseLatestVersion(); // check if template-version selected requires to manually load the model instead of using the InstanceTypeManager if (isTemplateIdChangedSinceInit || isLatestPropertyChanged) { setupWindowFromVmBase(template); } else { setupWindowFromVmBase(pool.getStaticData()); //can be set only from DB since it is not part of the Template's fields getModel().getCpuPinning().setEntity(pool.getCpuPinning()); } }
model.getCpu().setMode(CpuMode.HOST_PASSTHROUGH); model.getCpu().setCpuTune(stringToCpuTune(entity.getCpuPinning()));
getModel().getProvisioning().setEntity(Guid.Empty.equals(vm.getVmtGuid())); getModel().getCpuPinning().setEntity(vm.getCpuPinning());