I was trying to deploy some of my old Linux ovf but I was getting an error about ovf chunkSize.
I had a quick look and found this VMware KB and the error is due to VMware no longer supporting ChunkSize in vSphere 6.5. To fix this issue I had to extract the ovf, I used 7-zip.
If there are multiple disks you may have to combine them using command like the below.
copy /b vmName-disk1.vmdk.000000 + vmName-disk1.vmdk.000001 + ….. + <until the last fragment> vmName-disk1.vmdk
I only had one disk so I used the below.
copy /b Linux-VM-disk1.vmdk.000000000 Linux-VM-disk1.vmdk
Once the file copy command has completed I needed to edit the Linux-VM.ovf file to remove the ChunkSize. I used Notepad ++ to edit this. You can search for chunksize.
<File ovf:chunkSize=”7516192768″ ovf:href=”Linux-VM-disk1.vmdk” ovf:id=”file1″ ovf:size=”58041344″/>
Below is the updated ovf file with the ChunkSize removed.
<File ovf:href=”Linux-VM-disk1.vmdk” ovf:id=”file1″ ovf:size=”58041344″/>
After making the change I tried to import the ovf again. To import use the individual files.
I then got a new error.
This was due to the manifest file the Linux-vm.mf not matching the updated ovf file. To get the filehash run the below command in Powershell. The hash has to be in lower case so use the .tolower to convert the response to lower case.
(Get-FileHash .\Linux-vm.ovf -Algorithm SHA1).hash.tolower()
I then had to edit the Linux-vm.mf file.
Change the SHA1 Linux-VM.OVF file hash, To the new hash that has been export from PowerShell.
Below if the updated .mf file.
After this I was then able to complete the OVF import.
Once Imported we can then export the file to an OVA again so that it can be imported when needed.
Thanks you Bro, very clean and easy guide.
LikeLike