Using MD5sum to verify the integrity of copied files
book
Article ID: 344339
calendar_today
Updated On:
Products
VMware vCenter ServerVMware vSphere ESXi
Issue/Introduction
This article provides details about using MD5sum to verify the integrity of files that have been copied over a network, or between local disks.
Environment
ESX vCenter
Resolution
To use MD5sum to verify the integrity of copied files:
On the server that the files are being copied from, create an MD5 digest for each of the files that it is required to verify the integrity of. Create an MD5 value for just one file, or for many files at a time. To collect all the digests and put them into a text file, run the following command from the ESX service console:
# md5sum * > files.md5
Once the files have been copied over to the destination server, copy the .md5 file into the same directory that contains the files that it is required to verify the integrity of, and run the following command to check the files that are listed in the .md5 file:
# md5sum -c files.md5
If the output is similar to the following, then the MD5 digest on the destination matches that of the source:
server-flat.vmdk OK server.vmdk OK server.vmx OK
If the output is similar to the following, then the MD5 digest on the destination does not match that of the source, which indicate corruption during the file transfer:
server-flat.vmdk FAILED md5sum: WARNING: 1 of 1 computed checksums did NOT match
Alternatively, the MD5 digest can be compared by manually running these commands on both the source and destination of the copy:
To create an MD5 value for one file, run the following command: