Changes for page libvirt
Last modified by Sebastian Marsching on 2023/05/16 20:12
From version 10.1
edited by Sebastian Marsching
on 2023/05/16 20:06
on 2023/05/16 20:06
Change comment:
There is no comment for this version
To version 11.1
edited by Sebastian Marsching
on 2023/05/16 20:07
on 2023/05/16 20:07
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -61,7 +61,7 @@ 61 61 62 62 libvirt offers a utility called virt-sparsify, which helps with recovering unused space from virtual disk images, reducing their size on disk. This is particularly useful with images in the QCOW2 format. 63 63 64 -The utility can either be used in-place or create a new image. To use the in-place variant, use the following command: 64 +The utility can either be used in-place or create a new image. In either case, the virtual machine has to be shutdown before starting the process. To use the in-place variant, use the following command: 65 65 66 66 ```bash 67 67 virt-sparsify --in-place /path/to/image.qcow2 ... ... @@ -80,3 +80,5 @@ 80 80 ``` 81 81 82 82 This will create an entirely new image, not touching the original one. Typically, the only useful values for the prellocation option or `none` or `metadata`. Using `falloc` or `full` will defeat the purpose of `virt-sparsify`, because instead of creating a sparse image, the unused space in the image is still going to be allocated, thus not freeing up any space. 83 + 84 +Please note that when using this method, internally stored snapshots are going to be lost, so make sure that the virtual machine does not have any snapshots before starting this process.