HI Ali, What is the MS OS Type..is it Ubuntu? ON Ubuntu we had faced similar issue and after disabling the AppArmor and it start discovering the host.
Try below steps: Disable AppArmor: run this below command on your MS -------------------------- ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/ apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper ref this link: http://www.greenhills.co.uk/2013/08/30/cloudstack-single-server-on-ubuntu-with-kvm.html Hope this will help. -sadhu -----Original Message----- From: Ali Ahsan [mailto:ali.ah...@northbaysolutions.net] Sent: 24 June 2014 15:27 To: users@cloudstack.apache.org Subject: Re: Cloud Stack | Unable to add KVM host Getting following error in /var/log/cloudstack/management/apilog.log 2014-06-24 05:55:54,798 INFO [a.c.c.a.ApiServer] (catalina-exec-25:ctx-27372762 ctx-320dcf2a) (userId=2 accountId=2 sessionId=6BDD265F6DD8ED6CE0ACB61C30EEF74E) 10.10.10.54 -- GET command=listZones&response=json&sessionkey=21XmVziBudhgCB4dQOQSoUP7GJQ%3D&id=ed7e7f89-26a3-4daa-8596-a1a3cb4dea3a&_=1403603754584 200 { "listzonesresponse" : { "count":1 ,"zone" : [ {"id":"ed7e7f89-26a3-4daa-8596-a1a3cb4dea3a","name":"nbs1","dns1":"8.8.8.8","internaldns1":"10.10.10.2","networktype":"Basic","securitygroupsenabled":true,"allocationstate":"Enabled","zonetoken":"dd3ede54-374b-325f-86e6-2a6a0f339b0a","dhcpprovider":"VirtualRouter","localstorageenabled":false,"tags":[]} ] } } 2014-06-24 05:55:54,802 INFO [a.c.c.a.ApiServer] (catalina-exec-17:ctx-dae12f6d ctx-67a17afc) (userId=2 accountId=2 sessionId=6BDD265F6DD8ED6CE0ACB61C30EEF74E) 10.10.10.54 -- GET command=listDomains&listAll=true&response=json&sessionkey=21XmVziBudhgCB4dQOQSoUP7GJQ%3D&_=1403603754637 200 { "listdomainsresponse" : { "count":1 ,"domain" : [ {"id":"bf2312e0-fae0-11e3-92f2-000c2991c954","name":"ROOT","level":0,"haschild":false,"path":"ROOT"} ] } } 2014-06-24 05:55:55,069 INFO [a.c.c.a.ApiServer] (catalina-exec-15:ctx-df60582a ctx-6980ce47) (userId=2 accountId=2 sessionId=6BDD265F6DD8ED6CE0ACB61C30EEF74E) 10.10.10.54 -- GET command=listPods&zoneid=ed7e7f89-26a3-4daa-8596-a1a3cb4dea3a&response=json&sessionkey=21XmVziBudhgCB4dQOQSoUP7GJQ%3D&_=1403603754820 200 { "listpodsresponse" : { "count":1 ,"pod" : [ {"id":"7822e7bd-de80-44bb-9d63-381cab4c7f18","name":"nbspod","zoneid":"ed7e7f89-26a3-4daa-8596-a1a3cb4dea3a","zonename":"nbs1","gateway":"10.10.0.244","netmask":"255.255.255.0","startip":"10.10.0.20","endip":"10.10.0.230","allocationstate":"Enabled"} ] } } 2014-06-24 05:55:55,242 INFO [a.c.c.a.ApiServer] (catalina-exec-21:ctx-80367283 ctx-88b5bc33) (userId=2 accountId=2 sessionId=6BDD265F6DD8ED6CE0ACB61C30EEF74E) 10.10.10.54 -- GET command=listClusters&podid=7822e7bd-de80-44bb-9d63-381cab4c7f18&response=json&sessionkey=21XmVziBudhgCB4dQOQSoUP7GJQ%3D&_=1403603755201 200 { "listclustersresponse" : { "count":1 ,"cluster" : [ {"id":"13ee3d9a-015f-4fe6-a428-e3bf5f42b153","name":"cluster1","podid":"7822e7bd-de80-44bb-9d63-381cab4c7f18","podname":"nbspod","zoneid":"ed7e7f89-26a3-4daa-8596-a1a3cb4dea3a","zonename":"nbs1","hypervisortype":"KVM","clustertype":"CloudManaged","allocationstate":"Enabled","managedstate":"Managed","cpuovercommitratio":"1.0","memoryovercommitratio":"1.0"} ] } } 2014-06-24 05:56:09,976 INFO [a.c.c.a.ApiServer] (catalina-exec-4:ctx-8f909718 ctx-e3f328d4) (userId=2 accountId=2 sessionId=6BDD265F6DD8ED6CE0ACB61C30EEF74E) 10.10.10.54 -- POST command=addHost&response=json&sessionkey=21XmVziBudhgCB4dQOQSoUP7GJQ%3D 530 Unable to add the host On 6/24/2014 2:52 PM, Ali Ahsan wrote: > > [root@srvr1 ~]# hostname > srvr1.cloud.priv > > > > Getting following error in agent.log > > > 2014-06-24 05:17:32,402 WARN [utils.nio.Task] (Agent-Handler-1:null) > Caught the following exception but pushing on > java.lang.NullPointerException > at > com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.createStoragePool(LibvirtStorageAdaptor.java:533) > at > com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:289) > at > com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:281) > at > com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.initialize(LibvirtComputingResource.java:4111) > at com.cloud.agent.Agent.sendStartup(Agent.java:296) > at com.cloud.agent.Agent$ServerHandler.doTask(Agent.java:825) > at com.cloud.utils.nio.Task.run(Task.java:83) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:744) > > On 6/24/2014 1:47 PM, Suresh Sadhu wrote: >> Discovery exception comes generally when we don't set host FQDN. >> >> What is the output of # hostname --fqdn. >> >> Also check the agent log for exceptions .if you followed the >> instructions properly and still sees an issue ,please feel free to >> raise a bug using below >> https://issues.apache.org/ >> >> >> >> Regards >> Sadhu >> >> >> >> -----Original Message----- >> From: Nux! [mailto:n...@li.nux.ro] >> Sent: 24 June 2014 13:37 >> To: users@cloudstack.apache.org >> Subject: Re: Cloud Stack | Unable to add KVM host >> >> Hi, >> >> Please check the agent.log on the hypervisor, it may contain useful >> clues as to why the operation has failed. >> >> >> >> -- >> Sent from the Delta quadrant using Borg technology! >> >> Nux! >> www.nux.ro >> >> >> ----- Original Message ----- >> From: "Ali Ahsan" <ali.ah...@northbaysolutions.net> >> To: users@cloudstack.apache.org >> Sent: Tuesday, 24 June, 2014 8:34:33 AM >> Subject: Re: Cloud Stack | Unable to add KVM host >> >> 4.3 >> >> On 6/24/2014 12:32 PM, sebgoa wrote: >>> On Jun 24, 2014, at 9:21 AM, Ali Ahsan >>> <ali.ah...@northbaysolutions.net> wrote: >>> >>>> Yes I did, I followed Centos Quick Installation guide. >>>> >>> Which version of cloudstack are you using ? >>> >>>> Ali >>>> >>>> On 6/24/2014 11:49 AM, Rajani Karuturi wrote: >>>>> did you do agent install? >>>>> http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/hypervisor/kvm.html#install-and-configure-the-agent >>>>> >>>>> >>>>> >>>>> >>>>> ~Rajani >>>>> >>>>> >>>>> >>>>> On 24-Jun-2014, at 11:32 am, Ali Ahsan >>>>> <ali.ah...@northbaysolutions.net<mailto:ali.ah...@northbaysolutions.net>> >>>>> wrote: >>>>> >>>>> Hi, >>>>> >>>>> I have configured Cloud stack but unable to add KVM host both >>>>> mangment and KVM hosted on Same VM (Vmwear ). Please see the log >>>>> below. >>>>> >>>>> >>>>> INFO [c.c.a.ApiServer] (catalina-exec-19:ctx-5d9e0c4a >>>>> ctx-17cfe177) Unable to add the host >>>>> INFO [c.c.r.ResourceManagerImpl] (catalina-exec-20:ctx-94e1f583 >>>>> ctx-867ef602) Trying to add a new host at http://10.10.0.244 in >>>>> data center 1 >>>>> WARN [c.c.r.ResourceManagerImpl] (catalina-exec-20:ctx-94e1f583 >>>>> ctx-867ef602) Unable to find the server resources at >>>>> http://10.10.0.244 >>>>> INFO [c.c.u.e.CSExceptionErrorCode] >>>>> (catalina-exec-20:ctx-94e1f583 ctx-867ef602) Could not find >>>>> exception: com.cloud.exception.DiscoveryException in error code >>>>> list for exceptions >>>>> WARN [o.a.c.a.c.a.h.AddHostCmd] (catalina-exec-20:ctx-94e1f583 >>>>> ctx-867ef602) Exception: >>>>> com.cloud.exception.DiscoveryException: Unable to add the host >>>>> at >>>>> com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:780) >>>>> at >>>>> com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:575) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>>> Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>>> at >>>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) >>>>> at >>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) >>>>> at >>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) >>>>> at >>>>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) >>>>> at >>>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>>>> at >>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) >>>>> at com.sun.proxy.$Proxy145.discoverHosts(Unknown Source) >>>>> at >>>>> org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:143) >>>>> at >>>>> com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161) >>>>> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:531) >>>>> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:374) >>>>> at >>>>> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:323) >>>>> at com.cloud.api.ApiServlet.access$000(ApiServlet.java:53) >>>>> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:115) >>>>> at >>>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) >>>>> at >>>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) >>>>> at >>>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) >>>>> at >>>>> com.cloud.api.ApiServlet.processRequest(ApiServlet.java:112) >>>>> at com.cloud.api.ApiServlet.doPost(ApiServlet.java:79) >>>>> at >>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:637) >>>>> at >>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >>>>> at >>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >>>>> at >>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >>>>> at >>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >>>>> at >>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >>>>> at >>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >>>>> at >>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >>>>> at >>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) >>>>> at >>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >>>>> at >>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) >>>>> at >>>>> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889) >>>>> at >>>>> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721) >>>>> at >>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2274) >>>>> at >>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>>>> at >>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>>>> at java.lang.Thread.run(Thread.java:744) >>>>> INFO [c.c.a.ApiServer] (catalina-exec-20:ctx-94e1f583 >>>>> ctx-867ef602) Unable to add the host >>>>> >>>>> >>>>> >>>>> >>>>> >