UserVmVO vm = new UserVmVO(id, instanceName, displayName, template.getId(), hypervisorType, template.getGuestOSId(), offering.isOfferHA(), offering.getLimitCpuUse(), owner.getDomainId(), owner.getId(), userId, offering.getId(), userData, hostName, diskOfferingId); vm.setUuid(uuidName); vm.setDynamicallyScalable(template.isDynamicallyScalable());
@Override public void updateVM(long id, String displayName, boolean enable, Long osTypeId, String userData, boolean displayVm, boolean isDynamicallyScalable, String customId, String hostName, String instanceName) { UserVmVO vo = createForUpdate(); vo.setDisplayName(displayName); vo.setHaEnabled(enable); vo.setGuestOSId(osTypeId); vo.setUserData(userData); vo.setDisplayVm(displayVm); vo.setDynamicallyScalable(isDynamicallyScalable); if (hostName != null) { vo.setHostName(hostName); } if (customId != null) { vo.setUuid(customId); } if(instanceName != null){ vo.setInstanceName(instanceName); } update(id, vo); }