The issue is that you're just using a glob, *
, to list the files. The glob expands immediately, before tar
ever sees it, so what tar really sees is:
tar -cvf VM.ova VM.iso VM.mf VM.ovf VM.vmdk
Because under normal* circumstances globs expand lexically in the C
collation locale. If the order is important you can list the files manually:
tar -cvf VM.ova VM.ovf VM.mf VM.vmdk VM.iso
or use brace expansion to save some typing
tar -cvf VM.ova VM.{ovf,mf,vmdk,iso}
*It's possible for a glob to expand in a different order if you mess with your LC_*
vars, but I'm making some assumptions here.