Hi Jimmy
Could you please try the steps mentioned here https://github.com/apache/cloudstack/issues/8704#issuecomment-1963762570 Also please check if the libvirtd process is listenting on the port netstat -tunap|grep 16509 Regards Kiran From: Jimmy Huybrechts <[email protected]> Date: Thursday, 29 February 2024 at 2:44 AM To: [email protected] <[email protected]> Subject: Re: Import from external host Took some search indeed but this is what I get in the log: 2024-02-28 22:07:26,036 ERROR [c.c.a.ApiServer] (qtp1753127384-12419:ctx-46cafb61 ctx-360e905b) (logid:72359c47) unhandled exception executing api command: [Ljava.lang.String;@7e8da5b 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) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172) at com.cloud.api.ApiServer.queueCommand(ApiServer.java:782) at com.cloud.api.ApiServer.handleRequest(ApiServer.java:603) at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:347) at com.cloud.api.ApiServlet$1.run(ApiServlet.java:154) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52) at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:151) at com.cloud.api.ApiServlet.doGet(ApiServlet.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.base/java.lang.Thread.run(Thread.java:829) -- Jimmy Van: Wei ZHOU <[email protected]> Datum: woensdag, 28 februari 2024 om 19:42 Aan: [email protected] <[email protected]> Onderwerp: Re: Import from external host right, cloudsack-agent is not needed on the remote server. However, cloudstack selects a host (already managed by cloudstack) to connect to the libvirt daemon (listen on port 16509) of the remote server to get all the vms. You can search "GetRemoteVms" in the management server log. -Wei On Wed, Feb 28, 2024 at 7:08 PM Jimmy Huybrechts <[email protected]> wrote: > Hmm wait you need the cloudagent on the remote host as well? I would have > expected that not be needed right? > Which log should I look at? The management-server log? As I didn’t see > anything in there except for what I did include. > > -- > Jimmy > > Van: Wei ZHOU <[email protected]> > Datum: woensdag, 28 februari 2024 om 17:15 > Aan: [email protected] <[email protected]> > Onderwerp: Re: Import from external host > Any exception in the log? > > I wonder if it is similar as > https://github.com/apache/cloudstack/issues/8704#issuecomment-1963762570 > > -Wei > > On Wednesday, February 28, 2024, Jimmy Huybrechts <[email protected]> > wrote: > > > I’m trying to import vm’s from an external KVM host. I built a test KVM > > host with 5 virtual machines of which 4 are on and one is off. > > Libvirt is listening on tcp port 16509. > > > > When trying to fetch instances I get “Request failed. (530) Error while > > listing remote Vms” > > > > As host I’m using the KVM host IP of course, and the user and password > are > > that of my root user. (opened root access for this case). > > > > Is there some log I can see as to why I get that error? On the > > management-server log I only see: > > [28/Feb/2024:16:00:09 +0000] "GET /client/api/?zoneid=00122c1c- > > 89ae-4fbf-8424-e8619a787d39&page=1&pagesize=10&host= > > > KVMHOSTIP&username=root&password=PASSWORDFORHOST&hypervisor=kvm&command=listVmsForImport&response=json > > HTTP/1.1" 530 124 > > > > -- > > Jimmy > > >
