Views: 2708
ec2-register give:
Client.InvalidManifest: Invalid block device mapping: Invalid device name ‘/dev/xvda’
The solution was found at https://forums.aws.amazon.com/message.jspa?messageID=243692
We have pre-configured MongoDB with XFS as well as Passworded Security. To install go to AWS – Secure MongoDB 3.4 on XFS for superior performance
I mostly followed instructions at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html
ec2-register charming-amis/charming-LAMP-swap/image.manifest.xml -n charming-LAMP-swap-ami –virtualization-type hvm –region us-west-1
An earlier step needed to be:
ec2-bundle-vol -c /tmp/cert/charming-LAMP-with-swap-certificate.pem -k /tmp/cert/charming-LAMP-with-swap.pem -u USER_ID_FROM_IAM -r x86_64 -B root=/dev/xvda
-B root=/dev/xvda – is what was missing
- ec2-bundle-vol -c /tmp/cert/charming-LAMP-with-swap-certificate.pem -k /tmp/cert/charming-LAMP-with-swap.pem -uUSER_ID_FROM_IAM -r x86_64 -B root=/dev/xvda
- wait a few minutes
- copy and edit
- sudo cp /tmp/image.manifest.xml /tmp/image.manifest.xml.bak
- sudo xmllint –format /tmp/image.manifest.xml.bak > /tmp/image.manifest.xml
- add – before </block_device_mapping>
-
<mapping> <virtual>ephemeral1</virtual> <device>xvda</device> </mapping>
- ec2-upload-bundle -b charming-amis/charming-LAMP-swap -m /tmp/image.manifest.xml -a user-id-in-pem-file -s secret-key-in-pem-file
- You can remove the tmp files now or later
- sudo rm /tmp/image.manifest.xml /tmp/image.part.* /tmp/image
- I moved over to another computer where I have the keys in the ENV – becuase it didnt know “-o” for id
- ec2-register charming-amis/charming-LAMP-swap/image.manifest.xml -n charming-LAMP-swap-ami –virtualization-type hvm –region us-west-1 –
- still invalid block – Client.InvalidManifest: Invalid block device mapping: Invalid device name ‘/dev/xvda1