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.

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
add comment

1 Answer

up vote 3 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
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.