Skip to content

Commit

Permalink
Add temporary fix for macOS VM headless mode window id detect failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bineesh Nadukkalam committed May 20, 2024
1 parent 350620f commit e5a5708
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions builder/parallels/ipsw/step_create_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ func (s *stepCreateVM) Run(ctx context.Context, state multistep.StateBag) multis
return multistep.ActionHalt
}

// Temporary workaround
// Currently it is not possible to retrieve window ID of the MacOS VM when it is in headless mode
// So, we are setting the VM to window mode after setting the default configuration
command := []string{"set", name, "--startup-view", "window"}
if err := driver.Prlctl(command...); err != nil {
err := fmt.Errorf("Error setting VM to window mode: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}

// Set the VM name property on the first command
if s.vmName == "" {
s.vmName = name
Expand Down

0 comments on commit e5a5708

Please sign in to comment.