Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion agent/conf/agent.properties
Original file line number Diff line number Diff line change
Expand Up @@ -472,4 +472,3 @@ iscsi.session.cleanup.enabled=false
# Optional vCenter SHA1 thumbprint for VMware to KVM conversion via VDDK, passed as
# -io vddk-thumbprint=<value>. If unset, CloudStack computes it on the KVM host via openssl.
#vddk.thumbprint=

Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Answer execute(ConvertInstanceCommand cmd, LibvirtComputingResource serve
String vddkLibDir = resolveVddkSetting(cmd.getVddkLibDir(), serverResource.getVddkLibDir());
if (StringUtils.isBlank(vddkLibDir)) {
String err = String.format("VDDK lib dir is not configured on the host. " +
"Set '%s' in agent.properties or in details parameter of the import api calll to use VDDK-based conversion.", "vddk.lib.dir");
"Set '%s' in agent.properties or in details parameter of the import api call to use VDDK-based conversion.", "vddk.lib.dir");
logger.error("({}) {}", originalVMName, err);
return new Answer(cmd, false, err);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1325,10 +1325,7 @@ private UserVmResponse baseImportInstance(ImportUnmanagedInstanceCmd cmd) {
List<String> managedVms = new ArrayList<>(additionalNameFilters);
managedVms.addAll(getHostsManagedVms(hosts));

List<String> resourceLimitHostTags = resourceLimitService.getResourceLimitHostTags(serviceOffering, template);
try (CheckedReservation vmReservation = new CheckedReservation(owner, Resource.ResourceType.user_vm, resourceLimitHostTags, 1L, reservationDao, resourceLimitService);
CheckedReservation cpuReservation = new CheckedReservation(owner, Resource.ResourceType.cpu, resourceLimitHostTags, Long.valueOf(serviceOffering.getCpu()), reservationDao, resourceLimitService);
CheckedReservation memReservation = new CheckedReservation(owner, Resource.ResourceType.memory, resourceLimitHostTags, Long.valueOf(serviceOffering.getRamSize()), reservationDao, resourceLimitService)) {
try {

ActionEventUtils.onStartedActionEvent(userId, owner.getId(), EventTypes.EVENT_VM_IMPORT,
cmd.getEventDescription(), null, null, true, 0);
Expand Down Expand Up @@ -2673,10 +2670,7 @@ private UserVmResponse importKvmInstance(ImportVmCmd cmd) {

UserVm userVm = null;

List<String> resourceLimitHostTags = resourceLimitService.getResourceLimitHostTags(serviceOffering, template);
try (CheckedReservation vmReservation = new CheckedReservation(owner, Resource.ResourceType.user_vm, resourceLimitHostTags, 1L, reservationDao, resourceLimitService);
CheckedReservation cpuReservation = new CheckedReservation(owner, Resource.ResourceType.cpu, resourceLimitHostTags, Long.valueOf(serviceOffering.getCpu()), reservationDao, resourceLimitService);
CheckedReservation memReservation = new CheckedReservation(owner, Resource.ResourceType.memory, resourceLimitHostTags, Long.valueOf(serviceOffering.getRamSize()), reservationDao, resourceLimitService)) {
try {

if (ImportSource.EXTERNAL == importSource) {
String username = cmd.getUsername();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ public class UnmanagedVMsManagerImplTest {
ImportVMTaskVO importVMTaskVO;
@Mock
private VMInstanceDetailsDao vmInstanceDetailsDao;

@Mock
private ConfigKey<Boolean> configKeyMockParamsAllowed;
@Mock
Expand Down
Loading