I am comparing two qcow2 images file at two different location to see difference. /opt/images/file.qcow2 /mnt/images/file.qcow2
When i run
md5sum /opt/images/file.qcow2
md5sum /mnt/images/file.qcow2
both files the checksum is same
But when try to find md5sum using following piece of code
def isImageLatest(file1,file2):
print('Checking md5sum of {} {}'.format(file1, file2))
if os.path.isfile(file1) and os.path.isfile(file2):
md5File1 = hashlib.md5(file1).hexdigest()
md5File2 = hashlib.md5(file2).hexdigest()
print('md5sum of {} is {}'.format(file1, md5File1))
print('md5sum of {} is {}'.format(file2, md5File2))
else:
print('Either {} or {} File not found'.format(file1,file2))
return False
if md5File1 == md5File2:
return True
else:
return False
It says checksum is not same
UPDATE File size can of size of 8 GB