2017年1月6日 星期五

Shrinking qcow2 disk files

REF: https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files
Use the following command to zero out your disk:

dd if=/dev/zero of=/mytempfile
# that could take a some time
rm -f /mytempfile
  • rename original qcow2 file.

mv image.qcow2 image.qcow2_backup
  • Shrink your disk with compression (smaller disk size, takes longer to shrink, performance impact on slower systems):

qemu-img convert -O qcow2 -c image.qcow2_backup image.qcow2

沒有留言:

張貼留言