I packed a network appliance with vagrant
2.2.6 from apt repo on
ubuntu 20 /
wsl 1 /
In order for the vm to not error out when vagrant tries to connect to it, I use one of the available shells, which are not fully featured, as a workaround.
config.ssh.shell = "tclsh"
When I use vagrant
2.2.15 from Hashicorp repo it fails with error below.
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! sed -i '/#VAGRANT-BEGIN/,/#VAGRANT-END/d' /etc/fstab Stdout from the command: ' (>&2 printf '41e57d38-b4f7-4e46-9c38-13873d338b86-vagrant-ssh') sed -i '/#VAGRANT-BEGIN/,/#VAGRANT-END/d' /etc/fstab exit <HPE>sudo -E -H tclsh ^ % Unrecognized command found at '^' position. Stderr from the command:
If I omit
config.ssh.shell = "tclsh" then I get the following error
==> 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 The configured shell (config.ssh.shell) is invalid and unable to properly execute commands. The most common cause for this is using a shell that is unavailable on the system. Please verify you're using the full path to the shell and that the shell is executable by the SSH user.
Can anyone explain what exactly is vagrant doing with config-ssh-shell?
Can this setting be overridden? Could you point me to the source code and possible values?
Can vagrant be set to ignore such errors and continue executing the Vagrantfile?