Я создал VM CentOS7, используя Vagrant (2.2.3) и Virtual Box (5.2.24), для Windows 10 следующим образом (следуя этим инструкциям ... https://blog.centos.org/2019/02/updated-centos-vagrant-images-available-v1901-01/)
vagrant init centos/7
vagrant up
И все отлично работает
Затем я установил дополнение для гостей (rif. Https://github.com/dotless-de/vagrant-vbguest), таким образом
vagrant plugin install vagrant-vbguest
И мой последний Vagrantfile
следующий
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.name = "Test"
end
end
vagrant up
исполнение прекрасно работает
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1901.01' 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: Adapter 2: hostonly
==> 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
default: Warning: Connection reset. Retrying...
default: Warning: Connection aborted. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.24 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/Cesare/Personale/VagrantCentOS7/TestNew
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
ВМ запускается и vagrant ssh
работает нормально, но когда я пытаюсь подключиться через Putty (SSH на порт 22), используя IP-адрес (192.168.33.10), я получаю следующую ошибку
Где я делаю не так?