"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
} ]
"device_name": "/dev/xvda"
The device 'xvda' is used in more than one block-device mapping
--
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 packer-tool+unsubscribe@googlegroups.com.
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.
"builders": [{
"type": "amazon-ebs",
"communicator": "ssh",
"ssh_pty": "true",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
"source_ami": "ami-88e60ff1",
"instance_type": "t2.nano",
"ssh_username": "admin",
"ami_name": "jenkins-slave-stretch{{timestamp}}",
"encrypt_boot": true,
"ami_block_device_mappings": [ {
"device_name": "/dev/xvda",
"volume_size": 42,
"volume_type": "gp2",
"encrypted": true,
"delete_on_termination": true
} ]
}],
Error creating AMI: InvalidBlockDeviceMapping: The device 'xvda' is used in more than one block-device mapping
If I specify a different device id then I end up with an additional disk on the image:
This builder config:
"builders": [{
"type": "amazon-ebs",
"communicator": "ssh",
"ssh_pty": "true",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
"source_ami": "ami-88e60ff1",
"instance_type": "t2.nano",
"ssh_username": "admin",
"ami_name": "jenkins-slave-stretch{{timestamp}}",
"encrypt_boot": true,
"ami_block_device_mappings": [ {
"device_name": "/dev/xvdb",
"volume_size": 42,
"volume_type": "gp2",
"encrypted": true,
"delete_on_termination": true
} ]
}],
Ends up like this:
--
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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4cf0a442-53fb-4432-bfe0-2e52af7f53e6%40googlegroups.com.
"builders": [{
"type": "amazon-ebs",
"communicator": "ssh",
"ssh_pty": "true",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
"source_ami": "ami-88e60ff1",
"instance_type": "t2.nano",
"ssh_username": "admin",
"ami_name": "jenkins-slave-stretch{{timestamp}}",
"ami_block_device_mappings": [ {
"device_name": "/dev/xvda",
"volume_size": 42,
"volume_type": "gp2",
"delete_on_termination": true
} ]
}],
Build 'amazon-ebs' errored: Error creating AMI: InvalidBlockDeviceMapping: The device 'xvda' is used in more than one block-device mapping status code: 400, request id: 93848ef4-ad21-4c5f-aa35-29c66c545a6a
Try using xvdf. xvda is the default device.
"builders": [{ "type": "amazon-ebs", "communicator": "ssh", "ssh_pty": "true", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "eu-west-1", "source_ami": "ami-88e60ff1", "instance_type": "t2.nano", "ssh_username": "admin", "ami_name": "jenkins-slave-stretch{{timestamp}}",
"encrypt_boot": true, "ami_block_device_mappings": [ { "device_name": "xvda",
"volume_size": 42, "volume_type": "gp2", "delete_on_termination": true } ] }],
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.
--
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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/07ffb9d6-9e86-4d4a-9e25-3dfe57eaf6b2%40googlegroups.com.
Since you are running expansion of the fs at provisioning you should probably just switch to lunch_block_device_mappings.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/310d491b-ee58-4626-adf4-3e071b0469fe%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.