Vagrantfiles de várias máquinas não resolvem adequadamente as colisões

1

Ao criar duas VMs com o Vagrant v.1.8.1, a segunda VM também deseja usar a porta 2222 (mesmo que tenha havido uma colisão resolvida para a porta 2200):

Aqui está o meu Vagrantfile: Vagrant.configure("2") do |config| config.vm.define "master" do |master| master.vm.box = "centos" end

config.vm.define "slave1" do | slave1 |     slave1.vm.box="centos"   fim fim

E saída: Bringing machine 'master' up with 'virtualbox' provider... Bringing machine 'slave1' up with 'virtualbox' provider... ==> master: Importing base box 'centos65'... ==> master: Matching MAC address for NAT networking... ==> master: Setting the name of the VM: tapd-cluster_master_1461971062767_92860 ==> master: Clearing any previously set network interfaces... ==> master: Preparing network interfaces based on configuration... master: Adapter 1: nat ==> master: Forwarding ports... master: 22 (guest) => 2222 (host) (adapter 1) ==> master: Booting VM... ==> master: Waiting for machine to boot. This may take a few minutes... master: SSH address: 127.0.0.1:2222 master: SSH username: vagrant master: SSH auth method: private key master: master: Vagrant insecure key detected. Vagrant will automatically replace master: this with a newly generated keypair for better security. master: master: Inserting generated public key within guest... master: Removing insecure key from the guest if it's present... master: Key inserted! Disconnecting and reconnecting using new SSH key... ==> master: Machine booted and ready! ==> master: Checking for guest additions in VM... ==> master: Mounting shared folders... master: /vagrant => C:/cygwin64/home/randys/vagrant/tapd-cluster ==> slave1: Importing base box 'centos65'... ==> slave1: Matching MAC address for NAT networking... ==> slave1: Setting the name of the VM: tapd-cluster_slave1_1461971109891_81433 ==> slave1: Fixed port collision for 22 => 2222. Now on port 2200. ==> slave1: Clearing any previously set network interfaces... ==> slave1: Preparing network interfaces based on configuration... slave1: Adapter 1: nat ==> slave1: Forwarding ports... slave1: 22 (guest) => 2200 (host) (adapter 1) ==> slave1: Booting VM... ==> slave1: Waiting for machine to boot. This may take a few minutes... slave1: SSH address: 127.0.0.1:2222 slave1: SSH username: vagrant slave1: SSH auth method: private key slave1: Warning: Authentication failure. Retrying... slave1: Warning: Authentication failure. Retrying...

Observe como o Vagrant está tentando se conectar ao slave1 na porta 2222.

    
por Are Esolomon 30.04.2016 / 01:13

0 respostas