Skip to content

Crossport OVF deployment related fixes for VM Operator#3982

Merged
akutz merged 19 commits intovmware:vm-operator-vc-9.1.0from
aruneshpa:topic/vm-op-ovf-cherry-picks
Mar 17, 2026
Merged

Crossport OVF deployment related fixes for VM Operator#3982
akutz merged 19 commits intovmware:vm-operator-vc-9.1.0from
aruneshpa:topic/vm-op-ovf-cherry-picks

Conversation

@aruneshpa
Copy link
Copy Markdown
Contributor

Description

This is a release branch created for VCF 9.1 release to support deployment of OVFs using VM Operator.

How Has This Been Tested?

Yes, tested internally on a testbed.

@aruneshpa aruneshpa changed the title Topic/vm op ovf cherry picks Crossport OVF deployment related fixes for VM Operator Mar 17, 2026
@aruneshpa aruneshpa force-pushed the topic/vm-op-ovf-cherry-picks branch from 71770fc to a60f7a5 Compare March 17, 2026 20:41
hpannem and others added 19 commits March 17, 2026 13:43
… ConfigSpec(vmware#3964)

Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
Distinguish OVF disks that are backed by a file (ovf:fileRef) from
capacity-only (empty) disks in the generated ConfigSpec.

Implementation (configspec.go):
- Build a fileRefs map from Envelope.References and pass it through
  toHardware into toVirtualDisk.
- For disks with a DiskSection fileRef, set backing FileName from
  path.Base(File.Href) so file-backed disks get a non-empty name;
  empty disks keep an empty backing name.
- Build DeviceChange explicitly: for VirtualDisks, set FileOperation
  to Create for empty disks and to empty string for file-backed disks
  (existing file).

Tests and fixtures:
- Add fixtures/mixed-disks.ovf (one file-backed disk, one empty) and
  test "Mixed file-backed and empty disks" for backing FileName and
  FileOperation.
- Add test "File-backed disk name from path.Base(File.Href)" using
  fixtures/file-ref-path.ovf.
- In "Large" test, assert file-backed disk has non-empty FileName and
  empty disk has empty FileName.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
- Add OVF-to-vApp type mapping
  (DSP0243 Table 6 → vim.vApp.PropertyInfo):
  uint8/sint8/.../sint64 → int, String → string, Boolean → boolean,
  real32/real64 → real. Honor ovf:password for string → password.
- Parse ovf:qualifiers per DSP0243 9.5.1 Table 7: MinLen, MaxLen,
  ValueMap for string; ValueMap for integer types.
- Build VAppPropertyInfo.Type from base type and qualifiers (e.g.
  MinLen(1),MaxLen(65535) → string(1..65535), ValueMap → string["a","b"]
  or int(min..max)).
- Use computed type in toVAppConfig for both the property Info.Type and
  for parseVAppConfigValue so qualifier-derived constraints are applied.
- Add tests for qualifier-derived types and expect root_pwd Type
  "password" when ovf:password="true".

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
Add DeploymentConfiguration to ToConfigSpecOptions to select which
deployment option (DeploymentOptionSection) to use; default or first
if empty. Resolve by name with resolveDeploymentConfiguration().

Add tests for deployment config selection, OVF property types to
vAppPropertyInfo.Type, and file-ref path in disk backing.

Add fixtures: deployment-configs.ovf, property-types.ovf,
file-ref-path.ovf.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch fixes the vAppPropertyInfo types for strings with min/max
qualifiers.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch adds support for specifying OVF disk capacity via an OVF
property as well as handles possible invalid property key names.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch supports OVF product categories.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch adds OVF testing based on an uber OVF.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch adds support for vSphere-specific OVF property qualifiers.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch adds exhaustive OVF testing.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch changes ovf.ToConfigSpec to use the first element in a
VirtualSystemCollection if there is no VirtualSystem present.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
…d-disk-from-ovf

ovf: Support non-file backed disks, deployment configs, and vApp property qualifiers
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch allows the ovf.ToConfigSpec function to support when
an OVF does not have a VirtualHardware element.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch supports ovf.ToConfigSpec with SR-IOV NICs.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
This patch adds many more OVF fixtures to validate
ovf.ToConfigSpec.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
api: More OVF testing
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
Signed-off-by: Hemanth kumar Pannem <hemanth-kumar.pannem@broadcom.com>
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
fix: OVF spec parser for DMTF os types
Signed-off-by: Arunesh Pandey <arunesh-kumar.pandey@broadcom.com>
@aruneshpa aruneshpa force-pushed the topic/vm-op-ovf-cherry-picks branch from a60f7a5 to 9381829 Compare March 17, 2026 20:43
@akutz akutz merged commit e2554e7 into vmware:vm-operator-vc-9.1.0 Mar 17, 2026
2 checks passed
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 this pull request may close these issues.

4 participants