glennmatthews / cot

Common OVF Tool
MIT License
90 stars 23 forks source link

OVA image created with cot 2.2.1 and Python 3.8.5 fails the ovftool validation #82

Open ankirich opened 4 years ago

ankirich commented 4 years ago

Hi, I suddenly stumbled across the problem that cot script used to inject CSR1K OVA images with a prebuilt configs started creating an OVA which is not readable by ovftool:

_macos:user$ ovftool --deploymentOption=1CPU-4GB --net:GigabitEthernet1=ALL-VLANS --name=test_router --datastore=Test-VSAN /Users/user/Downloads/testrouter.ova vi://user:*****@vcenter.lab/LAB/host/TEST/test.lab

Error: Did not find an .ovf file at the beginning of the OVA package. Completed with errors

After playing a bit with different configs and OVAs, I came to conclusion that the only recent change was Python upgrade to 3.8.5. Indeed, after running cot with Python 3.7.0 things got back to normal and cot produced OVA file is now readable by the ovftool.

jbartlet commented 3 years ago

Ran into this as well today. Any updates?

jdp9 commented 1 year ago

Hi @glennmatthews, ran into this today when we were scoping for upgrading our python env to 3.8. Any updates or workaround for the same?

glennmatthews commented 1 year ago

My current day job doesn't focus on this particular tech area so I haven't had time to look into this. Sorry! Looking at https://docs.python.org/3/library/tarfile.html#tarfile.DEFAULT_FORMAT, I see that Python 3.8 changed the default tarfile format that it creates; possibly this needs to be accounted for.