Changes for page libvirt

Last modified by Sebastian Marsching on 2023/05/16 20:12

From version 12.1
edited by Sebastian Marsching
on 2023/05/16 20:07
Change comment: There is no comment for this version
To version 10.1
edited by Sebastian Marsching
on 2023/05/16 20:06
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -57,11 +57,11 @@
57 57  
58 58  This will create an XML file with the VM configuration and a QCOW2 file for each disk in `/path/to/destination/dir`. The XML file can be adjusted and then imported using `virsh define`.
59 59  
60 -# Recovering unused space from a virtual disk images
60 +# Recovering unused space from virtual disk images
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. In either case, the virtual machine has to be shutdown before starting the process. To use the in-place variant, use the following command:
64 +The utility can either be used in-place or create a new image. 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,5 +80,3 @@
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.