vma-extractor
vma-extractor copied to clipboard
Type hints, optional sparse output, stdin as input
This PR implements several improvements:
- Add Python type hints
- Remove seeking of input, making it possible to use
/dev/stdin
(e.g. zstdcat pipe) as an input (fixes #3) - Optionally write output as sparse files instead of filling explicitly with zeros. Zero-fill is default, however, as I've recently encoutered some odd integrity issues with sparse VMA extracts on CephFS
It has so far always produced identical output to the original PVE vma
command, but it's really hard to be 100% sure as the VMA format unfortunately doesn't have checksums for the device image contents, only the file headers.