I’m trying to figure out how to retrieve the fingerprint of an image before the import process is fully completed. Specifically, my workflow looks something like this:
1. I want to create a minimal or empty image (with some placeholder data, if necessary).
2. I need to know the image’s fingerprint at this point, even though the actual QCOW2 file or full image data hasn’t been downloaded or imported yet.
3. Once the QCOW2 file is ready, I plan to import it fully and replace the placeholder.
Is there any way to calculate or get the image’s fingerprint (or at least reserve a fingerprint) before completing the full import process? Any guidance or workarounds for this would be much appreciated!
thanks for your reply.
I need to create 1000’s of images from qcow files from different S3 buckets, Its possible to create an empty image using just metadata.tar to obtain an early fingerprint/id/alias of the image (as we do with volumes). then can start the async processs to download and import the qcow into the new image, knowing the image fingerprint/alias before hand we can monitor the image import process, register it and then define when the image is avaiable or the import process failed.
Thanks again
No, as mentioned, the image fingerprint is the hash of the entire chunk of data.
You can’t take one small file, make a hash of that, then combine it with a much larger file and still get the same hash.
k, what about using the alias instead ? can create an empty image and then complete the import of the real content. even if the fingerprint change we can use the alias to keep a record of the image in the creation process