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).


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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