hello

seems you got the user/pass on the wrong block.

https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html

config.ssh.username

or
x.ssh.username




On Wed, Jan 24, 2018 at 7:23 AM, Shashank Korada <[email protected]>
wrote:

> Hello,
>
> I am trying to launch VMs on a remote server by specifying the
> username/password for the server in the Vagrantfile but on running "vagrant
> up" it still prompts me for the password.
> How do I avoid being prompted for the password?
>
> This is my current Vagrantfile:
>
> VAGRANTFILE_API_VERSION = "2"
> Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
>   config.ssh.forward_agent = true
>   config.vm.define "test-remote-vm-libvirt" do |x|
>     x.vm.box = "ceph/ubuntu-xenial"
>     x.vm.hostname = "test-remote-vm-libvirt"
>     x.vm.network :private_network, ip: 10.0.10.100
>     x.vm.provider :libvirt do |v|
>       v.driver = "kvm"
>       v.host = "10.73.40.52"
>       v.username = "skorada"
>       v.password = "mypassword"
>       v.connect_via_ssh = true
>       v.memory = 2
>       v.cpus = 2
>       v.nested = true
>     end
>   end
> end
>
> Console logs on bringing up vagrant:
>
> skorada@test-server:~/home/vagrant/$ vagrant up
> Bringing machine 'test-remote-vm-libvirt' up with 'libvirt' provider...
>
> root@localhost's password:   ==================================> PASSWORD
> PROMPT
>
> ==> test-remote-vm-libvirt: Creating image (snapshot of base box volume).
> ==> test-remote-vm-libvirt: Creating domain with the following settings...
> ==> test-remote-vm-libvirt:  -- Name:
> master_test-remote-vm-libvirt
> ==> test-remote-vm-libvirt:  -- Domain type:       kvm
> ==> test-remote-vm-libvirt:  -- Cpus:              2
> ==> test-remote-vm-libvirt:  -- Feature:           acpi
> ==> test-remote-vm-libvirt:  -- Feature:           apic
> ==> test-remote-vm-libvirt:  -- Feature:           pae
> ==> test-remote-vm-libvirt:  -- Memory:            6000M
> ==> test-remote-vm-libvirt:  -- Management MAC:
> ==> test-remote-vm-libvirt:  -- Loader:
> ==> test-remote-vm-libvirt:  -- Base box:          ceph/ubuntu-xenial
> ==> test-remote-vm-libvirt:  -- Storage pool:      default
> ==> test-remote-vm-libvirt:  -- Image:             /var/lib/libvirt/images/
> master_test-remote-vm-libvirt.img (301G)
> ==> test-remote-vm-libvirt:  -- Volume Cache:      default
> ==> test-remote-vm-libvirt:  -- Kernel:
> ==> test-remote-vm-libvirt:  -- Initrd:
> ==> test-remote-vm-libvirt:  -- Graphics Type:     vnc
> ==> test-remote-vm-libvirt:  -- Graphics Port:     5900
> ==> test-remote-vm-libvirt:  -- Graphics IP:       127.0.0.1
> ==> test-remote-vm-libvirt:  -- Graphics Password: Not defined
> ==> test-remote-vm-libvirt:  -- Video Type:        cirrus
> ==> test-remote-vm-libvirt:  -- Video VRAM:        9216
> ==> test-remote-vm-libvirt:  -- Sound Type:
> ==> test-remote-vm-libvirt:  -- Keymap:            en-us
> ==> test-remote-vm-libvirt:  -- TPM Path:
> ==> test-remote-vm-libvirt:  -- INPUT:             type=mouse, bus=ps2
> ==> test-remote-vm-libvirt: Creating shared folders metadata...
> ==> test-remote-vm-libvirt: Starting domain.
> ==> test-remote-vm-libvirt: Waiting for domain to get an IP address...
> ==> test-remote-vm-libvirt: Waiting for SSH to become available...
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> skorada@localhost's password:    ====================================>
> PASSWORD PROMPT
> ==> test-remote-vm-libvirt: Setting hostname...
> ==> test-remote-vm-libvirt: Configuring and enabling network interfaces...
> ==> test-remote-vm-libvirt: Rsyncing folder: /home/vagrant/ => /vagrant
>
> skorada@localhost's password:   ====================================>
> PASSWORD PROMPT
>
>
> Am I missing any ssh config that is required? Also dont understand why I
> am being prompted for a password multiple times
> Any pointers would be helpful.
>
> Regards
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/453f75a4-41b0-4a6e-ae22-79b8f86b5717%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/453f75a4-41b0-4a6e-ae22-79b8f86b5717%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exi61x%2BbGzJP9L3Ei5oOy4hd3jZtVAR413xqr-ewitr-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to