Open
Description
problem
Cannot list VMs to migrate from VMware vCenter to KVM via CloudStack if the vCenter has one or more standalone hosts (hosts not belonging to any cluster).
Example failing vCenter setup (host 10.0.33.26 does not belong to any cluster):
When trying to list VMs for migration for the vCenter on the datacenter Trillian:
Error retrieving VMs from VMware VC: Error retrieving VMs from the VMware VC 10.0.35.109 datacenter Trillian: Standalone host is not supported
versions
4.19.3.0, 4.20.1.0
The steps to reproduce the bug
- Use standalone hosts on the datacenter from which to list the VMs on VMware (see image at the Problem description)
- On CloudStack navigate to Tools -> Import/Export Instances -> Migrate existing instances to KVM
- Provide the vCenter credentails
2025-06-25 17:31:26,877 DEBUG [c.c.h.v.m.VmwareManagerImpl] (qtp146370526-19:ctx-7213ab15 ctx-c24e22a0) (logid:9a3fc2a8) Connecting to the VMware vCenter 10.0.35.109
2025-06-25 17:31:27,082 INFO [c.c.h.v.u.VmwareContext] (qtp146370526-19:ctx-7213ab15 ctx-c24e22a0) (logid:9a3fc2a8) New VmwareContext object, current outstanding count: 10
2025-06-25 17:31:27,107 ERROR [c.c.h.v.m.VmwareManagerImpl] (qtp146370526-19:ctx-7213ab15 ctx-c24e22a0) (logid:9a3fc2a8) Error retrieving VMs from the VMware VC 10.0.35.109 datacenter Trillian: Standalone h
ost is not supported
java.lang.Exception: Standalone host is not supported
at com.cloud.hypervisor.vmware.mo.HostMO.getHyperHostCluster(HostMO.java:285)
at com.cloud.hypervisor.vmware.mo.BaseMO.setUnmanagedInstanceTOHostAndCluster(BaseMO.java:254)
at com.cloud.hypervisor.vmware.mo.BaseMO.createUnmanagedInstanceTOFromThinListingDynamicProperties(BaseMO.java:236)
at com.cloud.hypervisor.vmware.mo.BaseMO.convertVmsObjectContentsToUnmanagedInstances(BaseMO.java:186)
at com.cloud.hypervisor.vmware.mo.DatacenterMO.getAllVmsOnDatacenter(DatacenterMO.java:165)
at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.listVMsInDatacenter(VmwareManagerImpl.java:1670)
What to do about it?
Workaround: Move the host into an existing cluster (or a new cluster) and retry

After moving the host into the cluster p1-c1, VMs are properly listed on CloudStack:
