Skip to content

Commit

Permalink
fix: restore govc import.spec DiskProvisioning default value
Browse files Browse the repository at this point in the history
PR #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 #3483
  • Loading branch information
dougm committed Aug 2, 2024
1 parent e63f127 commit 11dc5a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovf/importer/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ func Spec(fpath string, a Archive, hidden, verbose bool) (*Options, error) {
}

o := Options{
DiskProvisioning: allDiskProvisioningOptions[0],
IPAllocationPolicy: allIPAllocationPolicyOptions[0],
IPProtocol: allIPProtocolOptions[0],
DiskProvisioning: string(types.OvfCreateImportSpecParamsDiskProvisioningTypeFlat),
IPAllocationPolicy: string(types.VAppIPAssignmentInfoIpAllocationPolicyDhcpPolicy),
IPProtocol: string(types.VAppIPAssignmentInfoProtocolsIPv4),
MarkAsTemplate: false,
PowerOn: false,
WaitForIP: false,
Expand Down

0 comments on commit 11dc5a3

Please sign in to comment.