Difference between revisions of "Qemu-img resize"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 17: | Line 17: | ||
refcount bits: 16 | refcount bits: 16 | ||
corrupt: false | corrupt: false | ||
+ | |||
+ | |||
+ | == Shrink == | ||
+ | Your new image cannot be bootable. Make sure you understand implications. | ||
qemu-img resize YOUR_VM_MACHINE_NAME.img -10G | qemu-img resize YOUR_VM_MACHINE_NAME.img -10G |
Revision as of 13:00, 11 April 2021
qemu-img resize image_name.qcow2 +3G image resized.
Verify: qemu-img info image_name.qcow2 image: image_name.qcow2 file format: qcow2 virtual size: 500G (536870912000 bytes) disk size: 246G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: true refcount bits: 16 corrupt: false
Contents
Shrink
Your new image cannot be bootable. Make sure you understand implications.
qemu-img resize YOUR_VM_MACHINE_NAME.img -10G qemu-img: warning: Shrinking an image will delete all data beyond the shrunken image's end. Before performing such an operation, make sure there is no important data there. qemu-img: Use the --shrink option to perform a shrink operation
qemu-img resize --shrink YOUR_VM_MACHINE_NAME.img -10G Image resized.
Process:
Related commands
Activities
See also
Advertising: