cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Unable to list VMs on the remote KVM host, for import

Open sureshanaparti opened this issue 4 months ago • 7 comments

Failed to list the VMs in remote KVM host, for importing them to CloudStack.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
VM Import
CLOUDSTACK VERSION
4.19.0
CONFIGURATION

KVM hypervisor / Advanced Zone

OS / ENVIRONMENT

Tried on MS, KVM Hosts on Ubuntu 22.04 & MS / KVM Hosts on Rocky Linux 8

SUMMARY

Failed to list the VMs in remote KVM host, for importing them to CloudStack.

API cmd has the following parameters - zoneid, host, username, password, hypervisor=kvm.

API Response:

{
    "listvmsforimportresponse": {
        "uuidList": [],
        "errorcode": 530,
        "cserrorcode": 4250,
        "errortext": "Error while listing remote Vms"
    }
}

Exception in Logs:

2024-02-26 06:12:25,881 ERROR [c.c.a.ApiServer] (qtp1753127384-473:ctx-f57f9de7 ctx-67aa987a) (logid:2887196b) unhandled exception executing api command: [Ljava.lang.String;@106067a6
com.cloud.utils.exception.CloudRuntimeException: Error while listing remote Vms
	at org.apache.cloudstack.vm.UnmanagedVMsManagerImpl.getRemoteVms(UnmanagedVMsManagerImpl.java:2489)
	at org.apache.cloudstack.vm.UnmanagedVMsManagerImpl.listVmsForImport(UnmanagedVMsManagerImpl.java:2464)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy459.listVmsForImport(Unknown Source)
	at org.apache.cloudstack.api.command.admin.vm.ListVmsForImportCmd.execute(ListVmsForImportCmd.java:121)
STEPS TO REPRODUCE
  • Go to Import-Export Instances in Tools section
  • Select 'KVM' in Select Import-Export Source Hypervisor
  • Pick option 'Import Instance from KVM Host'
  • Add the remote host details, and Click on 'Fetch Instances'
EXPECTED RESULTS
The stopped VMs on the remote KVM host should be listed, for import
ACTUAL RESULTS
Unable to list VMs on the remote KVM, fails with Request Failed (530) error.

sureshanaparti avatar Feb 26 '24 06:02 sureshanaparti