Skip to content

Commit

Permalink
Fix firmware reverting to BIOSwhen pushing to template in content lib…
Browse files Browse the repository at this point in the history
…rary. (#68)

* Move cleanup to before push to library.

* Fix unnecessary function move.

* Remove boot order before pushing template.
  • Loading branch information
vantmet authored Jun 4, 2021
1 parent 50f1cca commit 52dd87d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builder/vsphere/common/step_import_to_content_library.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ func (s *StepImportToContentLibrary) Run(_ context.Context, state multistep.Stat
vm := state.Get("vm").(*driver.VirtualMachineDriver)
var err error

ui.Say("Clear boot order...")
err = vm.SetBootOrder([]string{"-"})
if err != nil {
state.Put("error", err)
return multistep.ActionHalt
}

if s.ContentLibConfig.Ovf {
ui.Say(fmt.Sprintf("Importing VM OVF template %s to Content Library...", s.ContentLibConfig.Name))
err = s.importOvfTemplate(vm)
Expand Down

0 comments on commit 52dd87d

Please sign in to comment.