title: Ordering files inside tar created from bash
body: <p>Any idea how to tar files in a specific order. I know it sounds weird at first, but hear me out. An OVA file is essentially a tar file but with a specific order. Tar is commonly used to create the file, but in order for the OVA to be recognised by HyperVisors like VMware, the files inside the OVA must be ordered in a very specific way. The .ovf file MUST be first in the OVA and the other files must appear in the order they are listed inside the .ovf</p>
  
  <p>Here's just a quick tree to help explain:</p>
  
  <pre><code>VM.ova--
         |
         |--VM.ovf
         |--VM.mf
         |--VM.vmdk
         |--VM.iso
  </code></pre>
  
  <p>That is the proper order. When I try to create an ova with tar it works, but the order is wrong. Here is how I am doing it. It's actually very basic.</p>
  
  <pre><code>tar -cvf VM.ova *
  </code></pre>
  
  <p>I just dive into the folder containing all the contents that need to be added to the OVA and run the tar command. Please help me order these files correctly. If we can't figure this out, the VM will never work with any HyperVisor. Thank you!</p>
  
  <p><strong>* UPDATE *</strong></p>
  
  <p>Currently the order that tar does by default is: vmdk, iso, mf, ovf</p>