diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index 75dcaed3b..aa598a5e1 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -24,10 +24,10 @@ type Config struct { common.PackerConfig `mapstructure:",squash"` awscommon.AccessConfig `mapstructure:",squash"` - AttachedDevicePath string `mapstructure:"attached_device_path"` ChrootMounts [][]string `mapstructure:"chroot_mounts"` CopyFiles []string `mapstructure:"copy_files"` DevicePath string `mapstructure:"device_path"` + DevicePrefix string `mapstructure:"device_prefix"` MountCommand string `mapstructure:"mount_command"` MountPath string `mapstructure:"mount_path"` SourceAmi string `mapstructure:"source_ami"` @@ -72,10 +72,6 @@ func (b *Builder) Prepare(raws ...interface{}) error { b.config.DevicePath = "/dev/sdh" } - if b.config.AttachedDevicePath == "" { - b.config.AttachedDevicePath = "/dev/xvdh" - } - if b.config.MountCommand == "" { b.config.MountCommand = "mount" } diff --git a/builder/amazon/chroot/step_attach_volume.go b/builder/amazon/chroot/step_attach_volume.go index 0617adca0..5b9b2a5ba 100644 --- a/builder/amazon/chroot/step_attach_volume.go +++ b/builder/amazon/chroot/step_attach_volume.go @@ -70,7 +70,7 @@ func (s *StepAttachVolume) Run(state map[string]interface{}) multistep.StepActio return multistep.ActionHalt } - state["device"] = config.AttachedDevicePath + state["device"] = device state["attach_cleanup"] = s return multistep.ActionContinue }