6
respostas

Problema vagrant up

Olá! Dei vagrant init hashicorp/bionic64 e até então tudo certo. Só que quando dei o vagrant up, deu erro ao final.

Como não coube todo o log de mensagens do prompt de comando, coloquei nesse https://pastebin.com/Rk7QmVkT

Eu escolhi o bionic64 ao invés do precise64 porque preciso do Ubuntu 18, pra estar exatamente num mesmo ambiente que tá num servidor que preciso mexer.

Como posso resolver? Obrigada

6 respostas

Olá Amanda, tudo bem? Talvez seja um erro dá própria box, mas você poderia tentar usando o ubuntu/bionic64 é o mesmo que utilizo e não tive nenhuma problema.

Tenta essa box e fala pra gente o resultado!

Ei, Jonilson!

Fiz com o box que sugeriu, mas não entendi se deu certo mesmo ou não.

PS C:\virtualmachines> vagrant init ubuntu/bionic64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
PS C:\virtualmachines> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/bionic64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/bionic64'
    default: URL: https://vagrantcloud.com/ubuntu/bionic64
==> default: Adding box 'ubuntu/bionic64' (v20200804.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200804.0.0/providers/virtualbox.box
Download redirected to host: cloud-images.ubuntu.com
    default:
==> default: Successfully added box 'ubuntu/bionic64' (v20200804.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20200804.0.0' is up to date...
==> default: Setting the name of the VM: virtualmachines_default_1596662420900_4407
==> 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: Running 'pre-boot' VM customizations...
==> 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
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

Muito estranho Amanda, aparentemente deu o mesmo erro, bem você poderia me dar informações sobre o seu ambiente? Qual o sistema operacional que você está utilizando? Qual a memória disponível na sua máquina? Talvez seja por isso. Quais as versões do Vagrant e do VirtualBox que você está usando?

De ante mão você poderia tentar adicionar a linha abaixo no Vagrantfile:

config.vm.boot_timeout

E tentar executar novamente, e fala pra gente o resultado!

Coloquei com o valor 10000 e ainda não deu certo =/

PS C:\virtualmachines> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/bionic64' version '1.0.282' is up to date...
==> 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
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
PS C:\virtualmachines> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/bionic64' version '1.0.282' is up to date...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
PS C:\virtualmachines>

Estou num Windows 10 Pro, i7, 8GB de RAM, com Hyper V ativado. Vagrant 2.2.9 e Virtualbox 6.1.12 r139181 (Qt5.6.2)

Amanda acho que o problema pode ser o Hyper-V ativado, nesse caso você pode tentar desabilitar o Hyper-V do Windows, porém deixar a virtualização (VT-x) habilitada na BIOS, então criar novamente a máquina com o Vagrant, ou então usar o próprio Hyper-V, como o instrutor Rafael Zago demonstrou nesse Alura+.

É, eu tentei novamente depois de desabilitar o Hyper-V e reiniciar a máquina, mas não deu certo. Vou ver esse Alura+ que me indicou.

De qualquer modo, muito obrigada pela atenção!