[pve-devel] copy_vm: new option -target

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Thu May 2 13:16:08 CEST 2013


Am 02.05.2013 13:05, schrieb Alexandre DERUMIER:
>>> I also read that we'll loose sparseness with qemu-img as it does raw 
> 
>>> export and import. 
> 
> I'm not sure about it, qemu-img code is
> 
> 
>            if (has_zero_init) {
>                 /* If the output image is being created as a copy on write image,
>                    assume that sectors which are unallocated in the input image
>                    are present in both the output's and input's base images (no
>                    need to copy them). */
>                 if (out_baseimg) {
>                     if (!bdrv_is_allocated(bs[bs_i], sector_num - bs_offset,
>                                            n, &n1)) {
>                         sector_num += n1;
>                         continue;
>                     }
>                     /* The next 'n1' sectors are allocated in the input image. Copy
>                        only those as they may be followed by unallocated sectors. */
>                     n = n1;
>                 }
>             } else {
>                 n1 = n;
>             }

Yes but with rbd export everything is allocated to 0.

Stefan



More information about the pve-devel mailing list