builder/parallels: Do not delete the first cdrom device

Just detach the iso from 'cdrom0', but do not delete this device from VM confguration.
This commit is contained in:
Mikhail Zholobov 2014-05-03 11:11:10 +04:00
parent 12e28f257f
commit dbe40b9f55
1 changed files with 5 additions and 1 deletions

View File

@ -35,7 +35,11 @@ func (s *StepRemoveDevices) Run(state multistep.StateBag) multistep.StepAction {
}
if _, ok := state.GetOk("attachedIso"); ok {
command := []string{"set", vmName, "--device-del", "cdrom0"}
command := []string{
"set", vmName,
"--device-set", "cdrom0",
"--device", "Default CD/DVD-ROM",
}
if err := driver.Prlctl(command...); err != nil {
err := fmt.Errorf("Error detaching ISO: %s", err)