Description
Problem
There is a problem on VMware to KVM migration in case the converting host doesn't have ovftool installed: conversion process fails with:
Cannot invoke org.apache.cloudstack.vm.UnmanagedInstanceTO.setCpuCores(java.lang.Integer)" because "convertedInstance is null
Workaround: install ovftool on the KVM hosts used for conversion
The reason of the failure is that the returned converted instance on line: https://github.com/apache/cloudstack/blob/4.20/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java#L1985 is null. This logic is missing the import instance logic that is present on: https://github.com/apache/cloudstack/blob/4.20/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java#L2036-L2056.
Versions
CloudStack 4.20.1 RC3
KVM hosts installing virt-v2v
The steps to reproduce the bug
- Install only virt-v2v on KVM host used for conversion, but not ovftool
- Migrate VMware VM to KVM through CloudStack
What to do about it?
Install ovftool on the KVM hosts used for conversion