While using KVM and the Virtual Machine Manager, I discovered I was running out of disk space, while doing the following:
- Virtual Machine Manager, Details view, select VirtIO Disk 1, right click and select Add Hardware, enter a size.
- Run the VM and test.
- Shutdown the VM.
- Virtual Machine Manager, Details view, select VirtIO Disk 2, right click and select Remove Hardware.
- Virtual Machine Manager, Details view, select VirtIO Disk 1, right click and select Add Hardware, enter a different size.
- Run the VM and test.
- And repeat, removing the second virtual disk and adding a new one that is a different size.
After a while of doing this, host reports its running out of space and crashes. Aeigh! Maybe the removed virtual hardware did not also get deleted?
Rebooting, I deleted the VM using the Virtual Machine Manager and host seems happy but the disk is still pretty full. (and also Virtual Machine Manager was empty of all my other VMs (yikes!), but the list repopulated later - for anyone coming here with also that problem, hopefully this will be true for you, too. Also, virsh list
gave nothing and still does, which made it extra scary).
How do I remove the unused virtual disks (if that is what is occupying the memory)?