diff --git a/builder/parallels/iso/step_attach_iso.go b/builder/parallels/iso/step_attach_iso.go index 0541271ea..49265e705 100644 --- a/builder/parallels/iso/step_attach_iso.go +++ b/builder/parallels/iso/step_attach_iso.go @@ -29,7 +29,6 @@ func (s *stepAttachISO) Run(state multistep.StateBag) multistep.StepAction { // Attach the disk to the controller ui.Say("Attaching ISO to the new CD/DVD drive...") - cdrom, err := driver.DeviceAddCdRom(vmName, isoPath) if err != nil { @@ -39,6 +38,19 @@ func (s *stepAttachISO) Run(state multistep.StateBag) multistep.StepAction { return multistep.ActionHalt } + ui.Say("Setting the boot order...") + command := []string{ + "set", vmName, + "--device-bootorder", fmt.Sprintf("hdd0 %s cdrom0 net0", cdrom), + } + + if err := driver.Prlctl(command...); err != nil { + err := fmt.Errorf("Error setting the boot order: %s", err) + state.Put("error", err) + ui.Error(err.Error()) + return multistep.ActionHalt + } + // Track the device name so that we can can delete later s.cdromDevice = cdrom