Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a VM using vmbuilder but I realize that I had set some of the flags incorrectly. Now when I do a virsh list -all it still appears, laughing at my novicity. How do I delete this? (I've already deleted the corresponding xml and qcow2 files).

share|improve this question
up vote 9 down vote accepted

If you have already removed the disk image file, you can completely get rid of the VM with virsh undefine <domain-id>. You can also specify --managed-save to delete any managed save images and --snapshots-metadata to remove snapshots for the specified VM.

If the VM is in inactive state you should use its name or UUID instead of domain-id.

share|improve this answer

Your Answer


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.