Cloudstack Libvirt and KVM issues after hard reboot

CentOS 6.4, CloudStack 4.2

I just had to force server reboot over IPMI (with few KVM VMs running), and after server booted, I could not start some of those VMs, from CloudStack UI.

After looking into cloudstack-agent log (/var/log/cloudstack/agent/agent.log), I found this suspicious errors:

2013-10-23 01:55:22,127 WARN [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3:null) LibvirtException
org.libvirt.LibvirtException: operation failed: domain 'i-6-76-VM' already exists with uuid 56225e11-d3e1-33b8-a18f-3763d3481192
 at org.libvirt.ErrorHandler.processError(Unknown Source)
 at org.libvirt.Connect.processError(Unknown Source)
 at org.libvirt.Connect.domainCreateXML(Unknown Source)

It seems like the qemu did not do it’s clean up, so you need to manually delte all .xml files in /etc/libvirt/qemu/  folder:

rm /etc/libvirt/qemu/*.xml

Restart libvirtd,  and after that, you will be able to start your VMs again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: