I'm just trying to vagrant up
a standard Ubuntu image for the first time. My company has set up Vagrant on my laptop already and installed some plugins for AWS. When I try to run vagrant up
on my personal Ubuntu image, with a separate Vagrantfile, I get the following error:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
AWS Provider:
* An access key ID must be specified via "access_key_id"
* A secret access key is required via "secret_access_key"
* An AMI must be configured via "ami" (region: #{region})
I'm not trying to connect to AWS. I'm just trying to set up my first personal image on my laptop.
vagrant-aws
plugin installed but not VirtualBox. Installing VirtualBox was all that was needed to fix the problem.If for some reason that still fails, then, per the OP's comment above, try using vagrant up
's --provider
option:
vagrant up --provider virtualbox
By default Vagrant will go through all of the config.vm.provider
and will choose the first usage provider, so you should add virtualbox
before aws
:
config.vm.provider "virtualbox" do |v|
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
v.memory = 4096
v.cpus = 2
end
or choose different provider manually either by --provider
as already mentioned, or VAGRANT_DEFAULT_PROVIDER
variable:
VAGRANT_DEFAULT_PROVIDER=virtualbox vagrant up
or use config.vm.provider
with no configuration in order to set the order in your Vagrantfile like:
Vagrant.configure("2") do |config|
# ... other config up here
# Prefer VirtualBox Fusion before VirtualBox
config.vm.provider "virtualbox"
config.vm.provider "aws"
end
See: Basic provider usage at vagrantup.com
If you need to use AWS provider, these error means you need to set-up the right credentials by using aws configure
command, so ~/.aws/credentials
can be created with your aws_access_key_id
and aws_secret_access_key
values. For AMI configuration, check README file of the plugin (basically you need to add aws.ami
into your Vagrant file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With