Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I try to launch an instance with OpenStack, I get the following error in nova-compute.log:

(nova.rpc): TRACE: libvirtError: operation failed: domain 'instance-0000000a' already exists with uuid 5f81a7d2-1b0f-8c72-4e1e-377c275e9289

However, virsh doesn't show any domains:

$ sudo virsh list
 Id Name                 State
----------------------------------

Why isn't that domain showing up in virsh if it's there?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

Your domain may be shut down. Run virsh list --all to see all domains.

share|improve this answer
add comment

Scenario 1:

Are you certain that virsh on the command line is talking to the same hypervisor as your OpenStack controller? This would be the simplest explanation as two why virsh is not showing the running instance.

Scenario 2:

If you use ps, do you see any qemu-kvm instances running? Try:

ps -fe | grep qemu-kvm

If there are qemu-kvm instances running, they'll have a -name parameter that should match the name used in virsh. You can just kill -9 these processes if they're supposed to be dead anyway.

share|improve this answer
    
Or what @daff said. That's probably it. –  larsks Feb 23 '12 at 1:11
add comment

Not yet familiar with OpenStack, but in regular old libvirt, that error usually implies not that there's a RUNNING instance, but that there's a DEFINED instance. "virsh list" only shows currently active VM's, not every defined VM. Try:

virsh edit instance-0000000a

If that pops open vim and has a bunch of XML in there, there's already a defined 'instance-0000000a' VM. If you are 100% sure you don't want it, quit out of the editor and use:

virsh undefine instance-0000000a

And then have OpenStack try whatever you were doing again, and it should work.

By the way, if you DO want what's there, you can start it with:

virsh start instance-0000000a

But again, not familiar with OpenStack, it may not like you doing that, no idea.

share|improve this answer
    
I don't know how I forgot "virsh list --all".. thanks to daff for reminding me. Use that instead of "virsh edit" to determine if the domain exists. –  Nex7 Feb 22 '12 at 23:25
    
Thanks, 'virsh undefine' is exactly what I needed in the same situation. –  jkff Mar 23 '12 at 10:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.