public void setMigrationSupport(MigrationSupport migrationSupport) { this.vmStatic.setMigrationSupport(migrationSupport); }
/** * {@code initVmStaticsOrderedByAutoStartup(List)} is the first method in VMs order selection tests. The other init * methods: <br> * {@code initVmStaticsOrderedByPriority} and {@code initVmStaticsOrderedByAutoStartup} are relying on each other * for creating an array of VM Static objects.<br> * Each of the methods modifies the VM static array according to the column which is being tested, started from the * least important column to the most.<br> * That way prioritizing a preceded column should be reflected in the selection and therefore to validate the order * is maintained. * * @return an array of VmStatics, in descending order according to: auto_startup, priority, MigrationSupport.<br> * The MigrationSupport is the one being checked.<br> */ private VmStatic[] initVmStaticsOrderedByMigrationSupport(List<VmStatic> vmStatics) { VmStatic[] vmStaticArray = new VmStatic[getEntitiesTotalCount()]; vmStaticArray = vmStatics.toArray(vmStaticArray); // initialize the VMs with equal settings: non HA, priority 1 and MIGRATABLE for (VmStatic element : vmStaticArray) { element.setAutoStartup(false); element.setPriority(1); element.setMigrationSupport(MigrationSupport.MIGRATABLE); } // set higher migration support value for the first VM vmStaticArray[0].setMigrationSupport(MigrationSupport.PINNED_TO_HOST); vmStaticArray[1].setMigrationSupport(MigrationSupport.IMPLICITLY_NON_MIGRATABLE); updateArrayOfVmStaticsInDb(vmStaticArray); return vmStaticArray; }
staticVm.setMigrationSupport(null);
private static VmStatic doMapVmBaseHwPartToVmStatic(VmBase entity, VmStatic staticVm, Version version) { staticVm.setMemSizeMb(entity.getMemSizeMb()); staticVm.setMaxMemorySizeMb(entity.getMaxMemorySizeMb()); staticVm.setAutoStartup(entity.isAutoStartup()); staticVm.setSmartcardEnabled(entity.isSmartcardEnabled()); staticVm.setDefaultBootSequence(entity.getDefaultBootSequence()); staticVm.setDefaultDisplayType(entity.getDefaultDisplayType()); staticVm.setNumOfSockets(entity.getNumOfSockets()); staticVm.setCpuPerSocket(entity.getCpuPerSocket()); staticVm.setThreadsPerCpu(entity.getThreadsPerCpu()); staticVm.setNumOfMonitors(entity.getNumOfMonitors()); staticVm.setSingleQxlPci(entity.getSingleQxlPci()); staticVm.setPriority(entity.getPriority()); staticVm.setUsbPolicy(entity.getUsbPolicy()); staticVm.setTunnelMigration(entity.getTunnelMigration()); staticVm.setMigrationSupport(entity.getMigrationSupport()); staticVm.setMigrationDowntime(entity.getMigrationDowntime()); staticVm.setDedicatedVmForVdsList(entity.getDedicatedVmForVdsList()); staticVm.setMinAllocatedMem(entity.getMinAllocatedMem()); staticVm.setNumOfIoThreads(entity.getNumOfIoThreads()); return staticVm; }
vm.getStaticData().setOsId(template.getOsId()); vm.getStaticData().setDefaultDisplayType(template.getDefaultDisplayType()); vm.getStaticData().setMigrationSupport(template.getMigrationSupport()); vm.getStaticData().setMultiQueuesEnabled(template.isMultiQueuesEnabled()); if (vm.getVmInit() == null) {