What definitely works is to run the command on a stock Amazon Linux AMI image, and then save the modified image (= create an image snapshot) as a custom AMI image of yours. What will work (but requires more effort on your side) If Vagrant is faster you will see the same error if cloud-init is faster it works. It might be a "race condition" where Vagrant happens to run its rsync phase faster than cloud-init (which is what aws.user_data is passing information to) can prepare the workaround for #72 on the machine for Vagrant. I have tried this workaround but Vagrant still occasionally fails with the same error. My experience with the described workaround I /think/ that the additional installation of the puppet package is not required for the actual fix (although Vagrant may use Puppet for provisioning the machine later, depending on how you configured Vagrant). Most importantly this will configure the OS to not require a tty for user ec2-user, which seems to be the root of the problem. In a nutshell, add the following to your Vagrantfile: aws.user_data = "#!/bin/bash\necho 'Defaults:ec2-user !requiretty' > /etc/sudoers.d/999-vagrant-cloud-init-requiretty
0 Comments
Leave a Reply. |