Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

govc import ova template failing with version v0.38.0 #3483

Closed
abhinandanbaheti opened this issue Jul 5, 2024 · 9 comments · Fixed by #3511
Closed

govc import ova template failing with version v0.38.0 #3483

abhinandanbaheti opened this issue Jul 5, 2024 · 9 comments · Fixed by #3511

Comments

@abhinandanbaheti
Copy link

abhinandanbaheti commented Jul 5, 2024

Following command to upload vmtemplate fails with the latest released version of govc - v0.38.0, while it works with previous version and it successfully uploads the vm template to vCenter.
govc import.ova -ds=${DATA_STORE} -host=${ESXI_HOST} -options=${TEMPLATE}.json ${TEMPLATE}.ova

Following error observed
govc: The device or operation specified at index '1' is not supported for the existing virtual machine platform.

Could it be related to any configuration issue or incompatibility with the VM template and the vCenter ?

Copy link
Contributor

github-actions bot commented Jul 5, 2024

Howdy 🖐   abhinandanbaheti ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@dougm
Copy link
Member

dougm commented Jul 7, 2024

Not aware of any related issues. Can you add the -trace flag, run with a govc version that works and with 0.38, then attach the 2 logs? We can take a look at the difference and the trace may also include more details on the fault.

govc import.ova -trace ... 2> import-ova-fails.log

@abhinandanbaheti
Copy link
Author

Error trace (IP is masked)
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <WaitForUpdatesExResponse xmlns="urn:vim25"><returnval><version>1</version><filterSet><filter type="PropertyFilter">session[527671da-b1b9-5e78-8093-7ed4e9e0016e]5229a095-a215-0e76-6f11-629445a043f0</filter><objectSet><kind>enter</kind><obj type="HttpNfcLease">session[527671da-b1b9-5e78-8093-7ed4e9e0016e]52d852bf-f672-c0aa-987e-f41593df0c66</obj><changeSet><name>error</name><op>assign</op></changeSet><changeSet><name>info</name><op>assign</op></changeSet><changeSet><name>state</name><op>assign</op><val xsi:type="HttpNfcLeaseState">initializing</val></changeSet></objectSet></filterSet></returnval></WaitForUpdatesExResponse> </soapenv:Body> </soapenv:Envelope>POST /sdk HTTP/1.1^M Host: *.*.*.*^M Content-Type: text/xml; charset="utf-8"^M Soapaction: urn:vim25/8.0.3.0^M User-Agent: govc/0.38.0^M

@dougm
Copy link
Member

dougm commented Jul 9, 2024

That's only a tiny snippet. Did you create 2 log files as requested, one with each govc version? You can then attach the files (paper clip icon), rather than paste.
Also if the ovf you're using is something you can provide, that may also be helpful. Feel free to send those details on email or slack to me.

@abhinandanbaheti
Copy link
Author

abhinandanbaheti commented Jul 15, 2024

thanks, I have DM'ed you the trace log and ova details in the VMware gChat Space, please let me know, if you find any issue.

@rgl
Copy link

rgl commented Jul 27, 2024

FWIW, this is also happening here with govc 0.39.0 and vSphere 8.0.1 while import talos as described in the Install the talos VM template into vSphere section at https://github.com/rgl/terraform-vsphere-talos/blob/main/README.md.

@gsalisbury
Copy link

I also have the same problem with 0.39.0 and 0.38.0 and vSphere 8.0.3.

@dougm
Copy link
Member

dougm commented Aug 2, 2024

Haven't heard from @abhinandanbaheti in a couple weeks, I did not get trace logs or ova to reproduce with.
Thanks @rgl , any chance you could prune those steps to reproduce? And/or -trace logs?
@gsalisbury do you have some steps to reproduce and/or -trace logs you can share?

@dougm
Copy link
Member

dougm commented Aug 2, 2024

I see the problem, it's caused by govc import.spec, rather than govc import.ova itself. PR #3427 switched to using generated lists of enum values, including the default value used for DiskProvisioning. This value is not valid for ESX:

"DiskProvisioning": "monolithicSparse",

I'll put a fix together tomorrow, along with tests to make sure we don't hit this again. In the meantime, you can change to the previous default or just remove the option from the json spec:

"DiskProvisioning": "flat"

dougm added a commit to dougm/govmomi that referenced this issue Aug 2, 2024
PR vmware#3427 changed to using generated enum lists in various govc commands.
This also changed the default DiskProvisioning value from "flat" to "monolithicSparse",
which results in a DeviceUnsupportedForVmPlatform fault when importing.

This change restores the default to "flat".
The default values for IPProtocol and IPAllocationPolicy had not changed,
but this commit explicitly sets their values rather than using first element of the generated list.

Fixes vmware#3483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants