Skip to content

Commit 11dc5a3

Browse files
committed
fix: restore govc import.spec DiskProvisioning default value
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
1 parent e63f127 commit 11dc5a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ovf/importer/spec.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ func Spec(fpath string, a Archive, hidden, verbose bool) (*Options, error) {
9999
}
100100

101101
o := Options{
102-
DiskProvisioning: allDiskProvisioningOptions[0],
103-
IPAllocationPolicy: allIPAllocationPolicyOptions[0],
104-
IPProtocol: allIPProtocolOptions[0],
102+
DiskProvisioning: string(types.OvfCreateImportSpecParamsDiskProvisioningTypeFlat),
103+
IPAllocationPolicy: string(types.VAppIPAssignmentInfoIpAllocationPolicyDhcpPolicy),
104+
IPProtocol: string(types.VAppIPAssignmentInfoProtocolsIPv4),
105105
MarkAsTemplate: false,
106106
PowerOn: false,
107107
WaitForIP: false,

0 commit comments

Comments
 (0)