[libvirt] [sandbox v2 2/5] virt-image-sandbox: tarball extracting function to be reusable