??????vmware 
workstation8??????????????????????????cloudstack4.0.2????????????agent,??????????ubuntu12.04
  
 ????????????????,??????????????????????,agent.log??????????????????????agent
 ????cloud-setup-agent,??????????????????agent
  
 **************************************************************
 ????agent.log??????????????
 ***************************************************************
 2014-03-19 04:07:51,649 ERROR [cloud.agent.AgentShell] (main:null) Unable to 
start agent: 
com.cloud.utils.exception.CloudRuntimeException: Cannot recv data: Connection 
reset by peer
 at 
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.configure(LibvirtComputingResource.java:654)
 at com.cloud.agent.Agent.<init>(Agent.java:163)
 at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:559)
 at com.cloud.agent.AgentShell.launchAgentFromClassInfo(AgentShell.java:514)
 at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:431)
 at com.cloud.agent.AgentShell.start(AgentShell.java:589)
 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:616)
 at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243)
2014-03-19 04:08:22,946 INFO  [utils.component.ComponentLocator] (main:null) 
Unable to find components.xml
2014-03-19 04:08:22,949 INFO  [utils.component.ComponentLocator] (main:null) 
Skipping configuration using components.xml
2014-03-19 04:08:22,949 INFO  [cloud.agent.AgentShell] (main:null) 
Implementation Version is 4.0.2.20130501180711
2014-03-19 04:08:22,950 INFO  [cloud.agent.AgentShell] (main:null) 
agent.properties found at /etc/cloud/agent/agent.properties
2014-03-19 04:08:22,952 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to using properties file for storage
2014-03-19 04:08:22,958 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to the constant time backoff algorithm
2014-03-19 04:08:23,076 INFO  [cloud.agent.Agent] (main:null) id is 
2014-03-19 04:08:23,164 INFO  [resource.virtualnetwork.VirtualRoutingResource] 
(main:null) VirtualRoutingResource _scriptDir to use: scripts/network/domr/kvm
  
 
*************************************************************************************
 setup.log??????????????
 
*************************************************************************************
 DEBUG:root:execute:route -n|awk '/^0.0.0.0/ {print $2,$8}'
DEBUG:root:execute:ifconfig cloudbr0
DEBUG:root:Found default network device:cloudbr0
DEBUG:root:execute:uname -r
DEBUG:root:execute:uname -m
DEBUG:root:execute:hostname -f
DEBUG:root:execute:kvm-ok
DEBUG:root:execute:service apparmor status
DEBUG:root:execute:apparmor_status |grep libvirt
DEBUG:root:Failed to execute:
DEBUG:root:execute:sudo /usr/sbin/service network-manager status
DEBUG:root:Failed to execute:network-manager: unrecognized service
DEBUG:root:execute:route -n|awk '/^0.0.0.0/ {print $2,$8}'
DEBUG:root:execute:ifconfig cloudbr0
DEBUG:root:Found default network device:cloudbr0
DEBUG:root:execute:ifconfig eth0
DEBUG:root:cloudbr0:eth0 already configured
DEBUG:root:execute:sudo /usr/sbin/service network-manager status
DEBUG:root:Failed to execute:network-manager: unrecognized service
DEBUG:root:execute:sudo /usr/sbin/service network-manager stop
DEBUG:root:Failed to execute:network-manager: unrecognized service
DEBUG:root:execute:sudo /usr/sbin/service network-manager status
DEBUG:root:Failed to execute:network-manager: unrecognized service
DEBUG:root:execute:sudo /usr/sbin/service network-manager stop
DEBUG:root:Failed to execute:network-manager: unrecognized service
DEBUG:root:execute:sudo update-rc.d -f network-manager remove
DEBUG:root:execute:ifup cloudbr0
DEBUG:root:execute:sudo /usr/sbin/service libvirt-bin status
DEBUG:root:execute:sudo /usr/sbin/service libvirt-bin stop
DEBUG:root:execute:sudo update-rc.d -f libvirt-bin remove
DEBUG:root:execute:sudo update-rc.d -f libvirt-bin defaults
DEBUG:root:execute:sudo /usr/sbin/service libvirt-bin status
DEBUG:root:execute:sudo /usr/sbin/service libvirt-bin start
DEBUG:root:execute:ufw allow 22
DEBUG:root:execute:ufw allow 1798
DEBUG:root:execute:ufw allow 16509
DEBUG:root:execute:ufw allow proto tcp from any to any port 5900:6100
DEBUG:root:execute:ufw allow proto tcp from any to any port 49152:49216
DEBUG:root:execute:sudo /usr/sbin/service ufw status
DEBUG:root:execute:sudo /usr/sbin/service ufw stop
DEBUG:root:execute:sudo /usr/sbin/service ufw status
DEBUG:root:execute:sudo /usr/sbin/service ufw start
DEBUG:root:execute:sudo /usr/sbin/service cloud-agent status
DEBUG:root:Failed to execute: * could not access PID file for cloud-agent
DEBUG:root:execute:sudo /usr/sbin/service cloud-agent stop
DEBUG:root:execute:sleep 30
DEBUG:root:execute:sudo update-rc.d -f cloud-agent remove
DEBUG:root:execute:sudo update-rc.d -f cloud-agent defaults
DEBUG:root:execute:sudo /usr/sbin/service cloud-agent status
DEBUG:root:Failed to execute: * could not access PID file for cloud-agent
DEBUG:root:execute:sudo /usr/sbin/service cloud-agent start

回复