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

OVA not compatible with Terraform Provider for vSphere #120

Open
dpottratz opened this issue Jan 11, 2023 · 5 comments
Open

OVA not compatible with Terraform Provider for vSphere #120

dpottratz opened this issue Jan 11, 2023 · 5 comments
Labels
stage/waiting-on-upstream This issue is waiting on an upstream change

Comments

@dpottratz
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

Using terraform "Deploying Virtual Machines from OVF/OVA" to create a virtual machine with and image created from packer will fail.

Reproduction Steps

  1. Create OVA/OVF image using packer. Image is based on Ubuntu 18.04 VMware cloud image. "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.ova"
  2. Use Deploying Virtual Machines from OVF/OVA to deploy the image using "## Deployment of VM from Local OVF"

It fails with the follow error:
│ Error: error while importing ovf/ova template, A specified parameter was not correct: ovfSection.info.key

│ with vsphere_virtual_machine.cvuv_vm,
│ on main.tf line 65, in resource "vsphere_virtual_machine" "vm":
│ 65: resource "vsphere_virtual_machine" "vm" {

With the Ubuntu Cloud image from "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.ova" Terraform will import the image without any issues.

It seems like packer is writing the OVF XML incorrectly. When using the 'disk' information from the packer OVF (because the information has changed with changes to the disk) and inserting it into the Ubuntu OVF XML the image will import without any issues.

Packer version

From packer version
v1.7.10

Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format

instead of posting it directly in the issue.

Operating system and Environment details

OS, Architecture, and any other information you can provide about the
environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

@dpottratz dpottratz added the bug label Jan 11, 2023
@github-actions github-actions bot removed the bug label Jan 11, 2023
@GardenGorgon
Copy link

For anyone who's had the error:
│ Error: error while importing ovf/ova template, A specified parameter was not correct: ovfSection.info.key

I solved it by going into the OVF file, and deleting the </vmw:StorageGroupSection> </vmw:StorageGroup> and </vmw:StorageSection> XML elements, then rebuilding the OVA file using this new OVF file.

Compare your OVF file to OVF file found by unpacking https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.ova

The cloudimg-amd64.ovf did not have the </vmw:Storage*> xml elements, so I removed those elements from my OVF file, rebuilt my OVA file with tar, and the OVA worked.

@nywilken nywilken transferred this issue from hashicorp/packer Feb 21, 2023
@GlasgowMoe
Copy link

GlasgowMoe commented Mar 1, 2023

Can we please get this issue fix? Seems like an issue with govmomi codebase not allowing to import the ovf/ova

https://issuehint.com/issue/vmware/govmomi/2666

@tenthirtyam
Copy link
Collaborator

Can we please get this issue fix? Seems like an issue with govmomi codebase not allowing to import the ovf/ova

https://issuehint.com/issue/vmware/govmomi/2666

@GlasgowMoe - if this is an issue with vmware/govmomi, the issue should be raised upstream.

@GlasgowMoe
Copy link

Can we please get this issue fix? Seems like an issue with govmomi codebase not allowing to import the ovf/ova
https://issuehint.com/issue/vmware/govmomi/2666

@GlasgowMoe - if this is an issue with vmware/govmomi, the issue should be raised upstream.

I am not 100% sure as i don't know really know Go. Id like someone else to confirm the issue before raising upstream.

@tenthirtyam
Copy link
Collaborator

Please refer to vmware/govmomi#2666. This is the issue link on the upstream dependency.

@tenthirtyam tenthirtyam added the stage/waiting-on-upstream This issue is waiting on an upstream change label Mar 2, 2023
@tenthirtyam tenthirtyam changed the title VMware OVA not compatible with terraform vSphere OVA not compatible with Terraform Provider for vSphere Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/waiting-on-upstream This issue is waiting on an upstream change
Projects
None yet
Development

No branches or pull requests

4 participants