Hi Here,
I created one vagrant file and from that I used to create the package box.
With the help of the package box, while I try to start the another vm, its having the below warning, its not starting.. I Have no idea how to fix this.
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
Its started, but not connected and the vagrant ssh
is not working
Rameshs-MacBook-Pro:vag_cent7_2 Ramesh$ vagrant ssh
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Below is my vagrant file.
Rameshs-MacBook-Pro:vag_cent7_2 Ramesh$ cat Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "/Users/Ramesh/lab_ansible/vag_cent7_1/package.box"
config.vm.hostname = "server2"
end
Help me on fixing this.
"mkdir ~vagrant/.ssh", | |
"chmod 700 ~vagrant/.ssh", | |
"echo 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key' > ~vagrant/.ssh/authorized_keys", | |
"chmod 600 ~vagrant/.ssh/authorized_keys", | |
"chown -R vagrant: ~vagrant/.ssh", |
--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/6753486f-e67c-4f39-9a8e-6f6756a56eab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ssh-keygen -t rsa -b 4096 -C "Vagrant"
cat vagrant.pub > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
-- Already its owned by vagrant, so skipped this step.
After vagrant reload, got the same error
vagrant reload
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
^C==> default: Waiting for cleanup before exiting...
Vagrant exited after cleanup due to external interrupt.
--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c90c0328-7c23-4f04-9e53-205e89fe8ba5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Additional information;
Rameshs-MacBook-Pro:.ssh Ramesh$ vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/Ramesh/lab_ansible/vag_cent7_1/.vagrant/.ssh/authorized_keys
IdentitiesOnly yes
LogLevel FATAL
Rameshs-MacBook-Pro:.ssh Ramesh$ cat /Users/Ramesh/lab_ansible/vag_cent7_1/.vagrant/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
Rameshs-MacBook-Pro:.ssh Ramesh$ ls -l /Users/Ramesh/lab_ansible/vag_cent7_1/.vagrant/.ssh/authorized_keys
-rw------- 1 Ramesh staff 409 Sep 15 20:31 /Users/Ramesh/lab_ansible/vag_cent7_1/.vagrant/.ssh/authorized_keys
Rameshs-MacBook-Pro:.ssh Ramesh$ chown -R vagrant: /Users/Ramesh/lab_ansible/vag_cent7_1/.vagrant/.ssh/authorized_keys
chown: vagrant: illegal user name
Rameshs-MacBook-Pro:.ssh Ramesh$
--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fba6a281-dc88-42ac-955d-62b54fa6bc87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Help me on fixing this, as Im new to this one.Hi Alvaro,
This is my full set of thing’s I worked.
I created one vagrant with ansible installed. I would like to use this for creating 2 more similar instances.
For that the after created first one, and for the second one, I created
Rameshs-MacBook-Pro:vag_cent7_1 Ramesh$ vagrant package ==> default: Attempting graceful shutdown of VM... ==> default: Clearing any previously set forwarded ports... ==> default: Exporting VM... ==> default: Compressing package to: /Users/Ramesh/lab_ansible/vag_cent7_1/package.box
After that I created the new vagrant box
vagrant box add --name server2 /Users/Ramesh/lab_ansible/vag_cent7_1/package.box --provider virtualbox
Rameshs-MacBook-Pro:boxes Ramesh$ mv server2 ansible_labNow I can connect without ssh password asking, but getting the shared file directory error.
Rameshs-MacBook-Pro:vag_cent7_2 Ramesh$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'ansible_lab'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: vag_cent7_2_default_1473912787464_34053 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: No guest additions were detected on the base box for this VM! Guest default: additions are required for forwarded ports, shared folders, host only default: networking, and more. If SSH fails on this machine, please install default: the guest additions and repackage the box to continue. default: default: This is not an error message; everything may continue to work properly, default: in which case you may ignore this message. ==> default: Setting hostname... ==> default: Mounting shared folders... default: /vagrant => /Users/Ramesh/lab_ansible/vag_cent7_2 ^R Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant The error output from the last command was: mount: unknown filesystem type 'vboxsf'
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c90c0328-7c23-4f04-9e53-205e89fe8ba5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0776bec5-a632-4766-91e8-43ac23623bb2%40googlegroups.com.