mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-29 11:14:04 -04:00
updated step_clone_vmx.go to work with vmx files using sata
This commit is contained in:
@@ -37,8 +37,14 @@ func (s *StepCloneVMX) Run(state multistep.StateBag) multistep.StepAction {
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
|
||||
diskName, ok := vmxData["scsi0:0.filename"]
|
||||
if !ok {
|
||||
var diskName string
|
||||
_, scsi := vmxData["scsi0:0.filename"]
|
||||
_, sata := vmxData["sata0:0.filename"]
|
||||
if scsi {
|
||||
diskName = vmxData["scsi0:0.filename"]
|
||||
} else if sata {
|
||||
diskName = vmxData["sata0:0.filename"]
|
||||
} else {
|
||||
err := fmt.Errorf("Root disk filename could not be found!")
|
||||
state.Put("error", err)
|
||||
return multistep.ActionHalt
|
||||
|
||||
Reference in New Issue
Block a user