To delete a KVM virtual machine guest using the virsh command, you can use the following steps:
- Connect to the host machine via ssh
- Start the virsh shell:
virsh
- List all running VMs:
virsh list --all
- Note the name or ID of the VM you want to delete.
- Destroy the VM:
virsh destroy <name or ID of VM>
- Undefine the VM:
virsh undefine <name or ID of VM>
- Verify that the VM has been deleted:
virsh list --all