Couple of general questions: What is the version of KVM host are you using ?.It needs to be supported by cloudstack.
Please verify if cloudstack management server can reach the host without any problem. I have not tired the latest version of cloudstack for KVM. Which version are you using ? Rajesh, Maigha. On Thu, Jul 20, 2017 at 9:27 AM, merlin <mer...@students.iitmandi.ac.in> wrote: > ?? anyone? > > > On 2017-07-19 17:29, merlin wrote: > >> Hi, >> >> I have been looking for a solution to the following problem for few days >> now- >> >> Earlier No matter what I did, I could not add a host into the UI. >> When I would restart the agent and the management services and try, it >> would still give the same "Unable to add host error" but then after >> that error I would try to view the status of service and get error >> agent to be stopped "subsys locked" >> Finally got an error in the agent.log saying unable to add host >> because trying to join with cluster:2 with kvm:null, and found in GUI >> that there were 2 clusters instead of 1(defualt with hypervisor >> specified as none) >> >> So in agent.properties I manually added "cluster:clustername" and >> restarted the services all over again and the host was creted with >> "ALERT" state and "disabled" Power state >> >> As workarounds I manually added the zone and pod names as well, which >> were untill now set to 'default' but host still gives me an Alert >> state and there is still a cluster with name "default" >> >> Here are the logs: >> >> >> Management: >> 2017-07-19 17:08:04,091 DEBUG [c.c.a.m.AgentManagerImpl] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) Sending >> Disconnect to listener: com.cloud.capacity.StorageCapacityListener >> 2017-07-19 17:08:04,091 DEBUG [c.c.a.m.AgentManagerImpl] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) Sending >> Disconnect to listener: com.cloud.capacity.ComputeCapacityListener >> 2017-07-19 17:08:04,091 DEBUG [c.c.h.Status] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) >> Transition:[Resource state = Enabled, Agent event = AgentDisconnected, >> Host id = 2, name = uay.cloud] >> 2017-07-19 17:08:04,118 DEBUG [c.c.a.m.ClusteredAgentManagerImpl] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) Notifying >> other nodes of to disconnect >> 2017-07-19 17:08:04,122 DEBUG [c.c.a.m.AgentManagerImpl] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) Failed to >> handle host connection: >> com.cloud.utils.exception.CloudRuntimeException: Unable to connect 2 >> 2017-07-19 17:08:04,124 DEBUG [c.c.a.m.AgentManagerImpl] >> (AgentConnectTaskPool-61:ctx-c177a372) (logid:12e7aa23) Can not send >> command com.cloud.agent.api.ReadyCommand due to Host 2 is not up >> 2017-07-19 17:08:06,210 INFO [o.a.c.f.j.i.AsyncJobManagerImpl] >> (AsyncJobMgr-Heartbeat-1:ctx-9164f16f) (logid:0b962537) Begin cleanup >> expired async-jobs >> 2017-07-19 17:08:06,217 INFO [o.a.c.f.j.i.AsyncJobManagerImpl] >> (AsyncJobMgr-Heartbeat-1:ctx-9164f16f) (logid:0b962537) End cleanup >> expired async-jobs >> >> >> Agent: >> >> 2017-07-19 17:17:42,768 WARN [utils.nio.NioConnection] >> (Agent-Handler-2:null) (logid:) Unable to connect to remote: is there >> a server running on port 8250 >> 2017-07-19 17:17:47,768 INFO [cloud.agent.Agent] >> (Agent-Handler-2:null) (logid:) Reconnecting... >> 2017-07-19 17:17:47,768 INFO [utils.nio.NioClient] >> (Agent-Handler-2:null) (logid:) Connecting to 10.8.19.2:8250 >> 2017-07-19 17:17:47,769 WARN [utils.nio.NioConnection] >> (Agent-Handler-2:null) (logid:) Unable to connect to remote: is there >> a server running on port 8250 >> 2017-07-19 17:17:52,769 INFO [cloud.agent.Agent] >> (Agent-Handler-2:null) (logid:) Reconnecting... >> 2017-07-19 17:17:52,770 INFO [utils.nio.NioClient] >> (Agent-Handler-2:null) (logid:) Connecting to 10.8.19.2:8250 >> 2017-07-19 17:17:53,012 INFO [utils.nio.NioClient] >> (Agent-Handler-2:null) (logid:) SSL: Handshake done >> 2017-07-19 17:17:53,012 INFO [utils.nio.NioClient] >> (Agent-Handler-2:null) (logid:) Connected to 10.8.19.2:8250 >> 2017-07-19 17:17:53,013 DEBUG [kvm.resource.LibvirtConnection] >> (Agent-Handler-1:null) (logid:) Looking for libvirtd connection at: >> qemu:///system >> 2017-07-19 17:17:53,035 DEBUG [kvm.resource.LibvirtCapXMLParser] >> (Agent-Handler-1:null) (logid:) Found /usr/libexec/qemu-kvm as a >> suiteable emulator >> 2017-07-19 17:17:53,036 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Executing: /bin/bash -c qemu-img >> --help|grep convert >> 2017-07-19 17:17:53,045 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Execution is successful. >> 2017-07-19 17:17:53,045 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) convert [-c] [-p] [-f fmt] [-t >> cache] [-T src_cache] [-O output_fmt] [-o options] [-S sparse_size] >> filename [filename2 [...]] output_filename >> >> 2017-07-19 17:17:53,046 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) cpus=8, speed=2128, ram=32524873728, >> _dom0MinMem=1073741824, cpu sockets=2 >> 2017-07-19 17:17:53,047 DEBUG [cloud.resource.ServerResourceBase] >> (Agent-Handler-1:null) (logid:) Parameters for private nic: 10.8.19.2 >> - 00:1e:67:4a:ae:89-255.255.0.0 >> 2017-07-19 17:17:53,047 DEBUG [cloud.resource.ServerResourceBase] >> (Agent-Handler-1:null) (logid:) Parameters for storage nic: 10.8.19.2 >> - 00:1e:67:4a:ae:89-255.255.0.0 >> 2017-07-19 17:17:53,047 DEBUG [cloud.resource.ServerResourceBase] >> (Agent-Handler-1:null) (logid:) Parameters for public nic: 10.8.19.2 - >> 00:1e:67:4a:ae:89-255.255.0.0 >> 2017-07-19 17:17:53,047 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Executing: >> /usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh >> 2017-07-19 17:17:53,066 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Execution is successful. >> 2017-07-19 17:17:53,067 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Executing: sudo grep InitiatorName= >> /etc/iscsi/initiatorname.iscsi >> 2017-07-19 17:17:53,108 DEBUG [kvm.resource.LibvirtComputingResource] >> (Agent-Handler-1:null) (logid:) Execution is successful. >> 2017-07-19 17:17:53,109 INFO [kvm.storage.LibvirtStorageAdaptor] >> (Agent-Handler-1:null) (logid:) Attempting to create storage pool >> 91901023-7f72-4f06-9aeb-54409b8a3e73 (Filesystem) in libvirt >> 2017-07-19 17:17:53,109 DEBUG [kvm.resource.LibvirtConnection] >> (Agent-Handler-1:null) (logid:) Looking for libvirtd connection at: >> qemu:///system >> 2017-07-19 17:17:53,112 INFO [kvm.storage.LibvirtStorageAdaptor] >> (Agent-Handler-1:null) (logid:) Found existing defined storage pool >> 91901023-7f72-4f06-9aeb-54409b8a3e73, using it. >> 2017-07-19 17:17:53,113 INFO [kvm.storage.LibvirtStorageAdaptor] >> (Agent-Handler-1:null) (logid:) Trying to fetch storage pool >> 91901023-7f72-4f06-9aeb-54409b8a3e73 from libvirt >> 2017-07-19 17:17:53,113 DEBUG [kvm.resource.LibvirtConnection] >> (Agent-Handler-1:null) (logid:) Looking for libvirtd connection at: >> qemu:///system >> >> >> >> Please suggest some solution >> > > -- > Regards > Merlin >