builder/amazon/chroot: Fix building PV images with mount_partition
Right now, if we have a source image that's PV, and try to build an image with mount_partition set to not 0, it does not get picked up. This is because under PV we only had a filesystem, not partitions, but you can convert a PV image to an HVM image during build time.
This commit is contained in:
parent
4da79a8837
commit
d3c65ee77d
|
@ -42,7 +42,7 @@ func (s *StepMountDevice) Run(_ context.Context, state multistep.StateBag) multi
|
||||||
wrappedCommand := state.Get("wrappedCommand").(CommandWrapper)
|
wrappedCommand := state.Get("wrappedCommand").(CommandWrapper)
|
||||||
|
|
||||||
var virtualizationType string
|
var virtualizationType string
|
||||||
if config.FromScratch {
|
if config.FromScratch || config.AMIVirtType != "" {
|
||||||
virtualizationType = config.AMIVirtType
|
virtualizationType = config.AMIVirtType
|
||||||
} else {
|
} else {
|
||||||
image := state.Get("source_image").(*ec2.Image)
|
image := state.Get("source_image").(*ec2.Image)
|
||||||
|
|
Loading…
Reference in New Issue