Vagrant error up windows 10

Asked

Viewed 417 times

3

I am using Homestead and Vagrant to create a Virtual Machine and run my web projects. However, I cannot log into my hosts (ex: meusite.dev), all are already properly configured on Homestead.yaml and in the archive hosts windows, however, whenever I apply the command Vagrant up, at the end of the command I receive the following error message:

==> homestead-7:
==> homestead-7:   [Composer\Downloader\TransportException]                                               
==> homestead-7:   The "https://getcomposer.org/versions" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
==> homestead-7:   failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
==> homestead-7:                                                                                          
==> homestead-7:
==> homestead-7: self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--] [<version>]
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Both the bash, like Vagrant, like Composer are already properly installed and updated. What could be this error?

2 answers

2

Hello,

The problem is probably the configuration of the DNS server on the operating system within your Vagrant box. To resolve, run the following commands:

auto eth0
iface eth0 inet dhcp
dns-search google.com
dns-nameservers dnsserverip

And restart the network service:

sudo service network restart

More details can be seen on this page where I found the problem solved (in English).

Try the procedure and tell me if it worked,

Hug.

  • Ideoliveira, how do I apply these commands via terminal? inside a specific folder?

  • only log via SSH and type one command at a time

  • is what I tried now... but when I type the command appears: "-bash: auto: command not found"

  • see if the "Vagrant login" command works https://www.vagrantup.com/docs/cli/login.html

  • outside the "Vagrant ssh" works, inside ssh does not work and presents the same error.

  • 1

    I am using linux - Ubuntu 16.4 LTS. I have already discovered the question, they are written inside: sudo vi /etc/network/interface and not directly on the terminal.

  • @ideoliveira, I’m just not being able to execute the last command: // vagrant@homestead:~$ sudo service network Restart Failed to Restart network.service: Unit network.service not found.

  • yes, I’m connected!

  • try this one: sudo ifdown eth0 && sudo ifup eth0

  • I gave the command, but it appeared: "Unknown interface eth0"

Show 5 more comments

1

The error consists of a DNS conflict, even if a proxy, update servernames or try forced resources for connection setup, the only alternative that frees the command is by upgrading windows using windows update feature or using an installation cd.

Microsoft did not comment on the subject, but update windows with Patch Packs generates a refresh of **Dnszone and reconfigures the internet protocols to work with Virtual Machine., thus allowing the update of Composer via ssh and the removal of the error "php_network_getaddresses"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.