Estou usando o vagrant para executar algumas máquinas virtuais no meu laptop pessoal (Windows 10).
Eu já instalei o ubuntu 14.04 e o centos neste laptop e tudo funciona como esperado.
Após alguns segundos, a máquina virtual estava ativa e o vagrant escreveu a seguinte mensagem:
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.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/xenial64'
default: URL: https://atlas.hashicorp.com/ubuntu/xenial64
==> default: Adding box 'ubuntu/xenial64' (v20160420.3.0) for provider: virtualbox
default: Downloading:
https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160420.3.0/providers/virtualbox.box
default: Progress: 100% (Rate: 2648k/s, Estimated time remaining:
--:--:--)
==> default: Successfully added box 'ubuntu/xenial64' (v20160420.3.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: Setting the name of the VM: ubuntu-xenial-16.04-cloudimg
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (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:2200
default: SSH username: ubuntu
default: SSH auth method: password
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH
key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
Como você pode ver, porque eu já tinha outra VM em execução (que não posso parar), o vagrant usava uma porta diferente para o ssh em vez do 2222 padrão.
Eu sei que posso acessar a VM usando o "vagrant ssh". Eu já fiz isso, mas dado que estou no windows, prefiro usar massa de vidraceiro.