Hi,
Really sorry to be asking this because I can see there are previous
threads, e.g. "Configuring size of root volume on EC2" but they actually
don't provide a clear answer and neither do the docs.
I'm building an AMI using the amazon-ebs builder. The reference AMI is a
Debian stretch image with an 8GB root volume. The source images use
/dev/xvda1 as the root partition.
I'd like my packer image to have a much larger volume, e.g. 40GB. Previous
threads indicate this should be possible by adding:
"ami_block_device_mappings": [ {
"device_name": "/dev/xvda",
"volume_size": 40,
"delete_on_termination": true
} ],
"launch_block_device_mappings": [ {
"device_name": "/dev/xvda",
"volume_size": 40,
"delete_on_termination": true
} ]
It's not clear to me what the distinction between
ami_block_device_mappings and launch_block_device_mappings is. What what I
understand of the docs they should be used when I want to add additional
devices beyond the root vol, but the discussion in the other thread
suggests using the code above is used to modify the root volume size.
I don't fully understand what it's doing, but more to the point, I can't
make it work.
The reference image boots from /dev/xvda1, so presumably I need
"device_name": "/dev/xvda"
but that throws this error:
The device 'xvda' is used in more than one block-device mapping
So, what device should I use is the source AMI is using /dev/xvda1 as root
partition and what the difference between the two mappings?
(I know I may need to deal with fs resize, but I'll get to that when it's a
problem)
Many Thanks,
Rich
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/ea501630-7e60-43aa-a543-cb60f90cbaa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.