public static void addVideoDevice(VmBase vmBase) { if (vmBase.getDefaultDisplayType().getDefaultVmDeviceType() == null) { return; } VmDevice vmDevice = new VmDevice(); vmDevice.setId(new VmDeviceId(Guid.newGuid(), vmBase.getId())); vmDevice.setType(VmDeviceGeneralType.VIDEO); vmDevice.setDevice(vmBase.getDefaultDisplayType().getDefaultVmDeviceType().getName()); vmDevice.setManaged(true); vmDevice.setPlugged(true); vmDevice.setReadOnly(false); vmDevice.setAddress(""); vmBase.getManagedDeviceMap().put(vmDevice.getDeviceId(), vmDevice); }
model.getIsHeadlessModeEnabled().setEntity(vmBase.getDefaultDisplayType() == DisplayType.none); if (displayTypes.contains(vmBase.getDefaultDisplayType())) { displayProtocol = vmBase.getDefaultDisplayType(); // if display types contain DT of a vm, pick this one
osRepository.getGraphicsAndDisplays(vmBase.getOsId(), new Version(getVersion())); GraphicsType graphicsType = vmBase.getDefaultDisplayType() == DisplayType.vga ? GraphicsType.VNC : GraphicsType.SPICE; GraphicsType supportedGraphicsType = null; for (Pair<GraphicsType, DisplayType> pair : graphicsAndDisplays) { if (pair.getSecond() == vmBase.getDefaultDisplayType()) { if (pair.getFirst() == graphicsType) { supportedGraphicsType = graphicsType; } else { log.warn("Cannot find any graphics type for display type {} supported by OS {} in compatibility version {}", vmBase.getDefaultDisplayType().name(), osRepository.getOsName(vmBase.getOsId()), getVersion());
readOsSection(node); if (!osRepository.isLinux(fullEntityOvfData.getVmBase().getOsId()) || fullEntityOvfData.getVmBase().getDefaultDisplayType() != DisplayType.qxl) { fullEntityOvfData.getVmBase().setSingleQxlPci(false);
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; }
vmBase.isAllowConsoleReconnect(), vmBase.getDedicatedVmForVdsList(), vmBase.getDefaultDisplayType(), vmBase.getMigrationDowntime(), vmBase.getVmInit(),
.addValue("cpu_shares", entity.getCpuShares()) .addValue("default_boot_sequence", entity.getDefaultBootSequence()) .addValue("default_display_type", entity.getDefaultDisplayType()) .addValue("origin", entity.getOrigin()) .addValue("initrd_url", entity.getInitrdUrl())
assertTrue(vm.isDeleteProtected()); assertEquals(VNC_KEYBOARD_LAYOUT, vm.getVncKeyboardLayout()); assertEquals(DISPLAY_TYPE, vm.getDefaultDisplayType()); assertTrue(vm.isSpiceFileTransferEnabled()); assertTrue(vm.isSpiceCopyPasteEnabled());