Skip to content

Commit 3040a0a

Browse files
committed
vcsim: support multiple VirtualSystemType in OvfManager.CreateImportSpec
Signed-off-by: Doug MacEachern <[email protected]>
1 parent cc135ec commit 3040a0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simulator/ovf_manager.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ func (m *OvfManager) CreateImportSpec(ctx *Context, req *types.CreateImportSpec)
190190

191191
hw := env.VirtualSystem.VirtualHardware[0]
192192
if vmx := hw.System.VirtualSystemType; vmx != nil {
193-
spec.ConfigSpec.Version = *vmx
193+
version := strings.Split(*vmx, ",")[0]
194+
spec.ConfigSpec.Version = strings.TrimSpace(version)
194195
}
195196

196197
ndisk := 0

0 commit comments

Comments
 (0)