Is there any way to shrink qcow2 image without converting it raw?
I cannot convert it to raw because I don't have disk space enough for raw image.
Noop conversion (qcow2-to-qcow2) removes sparse space:
You can also try add compression (
Before running above command be sure to shutdown the VM. After you are satisfied with the result, you can rename shrunk.qcow2 to original name your VM config wants.