Invert forward ssh port behaviour (#1289)

Multi machines environments will result in collisions until auto
correction is implemented. Therefore invert to keep the forwarding of
the default ssh port disabled by default initially until can handle the
port collisions detection and resolving.

Relates: #1012
This commit is contained in:
Darragh Bailey
2021-05-18 18:30:56 +01:00
committed by GitHub
parent 878b5ffe61
commit 981642afeb
3 changed files with 32 additions and 27 deletions

View File

@@ -1419,22 +1419,25 @@ Default is `eth0`.
### Forwarding the ssh-port
By default vagrant-libvirt now allows the standard ssh-port to be forwarded to
the localhost to allow for consistent provisioning steps/ports used when
Vagrant-libvirt now supports forwarding the standard ssh-port on port 2222 from
the localhost to allow for consistent provisioning steps/ports to be used when
defining across multiple providers.
Previously by default libvirt skipped the forwarding of the ssh-port because
you can access the machine directly. To return to this behaviour set the
option `forward_ssh_port` to `false` in the Vagrantfile.
To enable, set the following:
```ruby
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
# Disable forwarding of forwarded_port with id 'ssh'.
libvirt.forward_ssh_port = false
# Enable forwarding of forwarded_port with id 'ssh'.
libvirt.forward_ssh_port = true
end
end
```
Previously by default libvirt skipped the forwarding of the ssh-port because
you can access the machine directly. In the future it is expected that this
will be enabled by default once autocorrect support is added to handle port
collisions for multi machine environments gracefully.
## Synced Folders
Vagrant automatically syncs the project folder on the host to `/vagrant` in