How do I delete a VM from 'virsh list -all'?
Solution 1:
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.