mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 574 forks source link

Vagrant failed to determine the shell expansion of a guest path #544

Open zabquart opened 6 years ago

zabquart commented 6 years ago

Okay, first time posting, please be patient.

Platform; Host - Ubuntu 16.04 LTS => Guest - Windows10pro64 Vagrant Version - 2.1.1 Vagrant-AWS Version - 0.7.2 Also have cygwin installed on the Windows host. Connecting over SSH.

Vagrantfile

...
#Provision the machine
config.vm.provision :shell, path: "scripts/InstallMaven.bat", privileged: false, upload_path: "InstallMaven.bat"
config.vm.provision :shell, path: "scripts/InstallExcelsiorJet.bat", privileged: false, upload_path: "InstallExcelsiorJet.bat"

#This fails.
config.vm.provision :file, source: "../pom.xml", destination: "C:\\Users\\vagrant\\pom.xml"

Fails with the following error.. Vagrant failed to determine the shell expansion of a guest path (probably for one of your shared folders). This is an extremely rare error case and most likely indicates an unusual configuration of the guest system. Please report a bug with your Vagrantfile and debug log.

It should also be noted that I've turned off synced folder support as that also does not work with rsync. But that is an entirely different topic.

Previously I had been running Vagrant 1.8.1 and upgraded to the latest (2.1.1) hoping it might solve an odd quirk. Under 1.8.1, running a file provisioner, no matter what I set the destination to, it would always transfer to 'C:\Users\Vagrant>'. Yes that is 'Vagrant>' but at least it did it.. even if it completely ignored the intended destination directory. I am wondering if perhaps the error checking got better but not the underlying problem in version 2.1.1 where now it indicates a problem with the guest path.

Without AWS and just provisioning to a local virtualbox machine everything works exactly as expected.

Or if there is a better way to share/transfer files that avoids this issue all together I am all ears.

Debug log from command => vagrant provision aws --debug


==> aws: Running provisioner: file...
 INFO environment: Running hook: provisioner_run
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 3 hooks defined.
 INFO runner: Running action: provisioner_run #<Method: Vagrant::Action::Builtin::Provision#run_provisioner>
 INFO warden: Calling IN action: #<Proc:0x00000000035eda50@/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:94 (lambda)>
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
 INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute:  (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stderr: 'export' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.

 INFO guest: Autodetecting host type for [#<Vagrant::Machine: aws (VagrantPlugins::AWS::Provider)>]
DEBUG guest: Trying: atomic
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: grep 'ostree=' /proc/cmdline (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stderr: 'export' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.
'grep' is not recognized as an internal or external command,
operable program or batch file.

 INFO guest: Detected: atomic!
DEBUG guest: Searching for cap: shell_expand_guest_path
DEBUG guest: Checking in: atomic
DEBUG guest: Checking in: fedora
DEBUG guest: Checking in: redhat
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: shell_expand_guest_path in linux
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
 INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute:  (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stderr: 'export' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.

DEBUG guest: Searching for cap: shell_expand_guest_path
DEBUG guest: Checking in: atomic
DEBUG guest: Checking in: fedora
DEBUG guest: Checking in: redhat
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: shell_expand_guest_path in linux
 INFO guest: Execute capability: shell_expand_guest_path [#<Vagrant::Machine: aws (VagrantPlugins::AWS::Provider)>, "C:\\Users\\vagrant\\pom.xml"] (atomic)
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: echo; printf C:\Users\vagrant\pom.xml (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stderr: 'export' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.
'printf' is not recognized as an internal or external command,
operable program or batch file.

ERROR warden: Error occurred: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x000000000380dd58>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Released process lock: machine-action-6062611517671dba53963cb0f4cc4da1
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 3 hooks defined.
 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x0000000003919eb8>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::ShellExpandFailed: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.>
ERROR vagrant: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.
ERROR vagrant: /opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/guests/linux/cap/shell_expand_guest_path.rb:23:in `shell_expand_guest_path'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/capability_host.rb:111:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/capability_host.rb:111:in `capability'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/guest.rb:43:in `capability'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/file/provisioner.rb:51:in `expand_guest_path'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/file/provisioner.rb:7:in `block in provision'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/file/provisioner.rb:5:in `tap'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/provisioners/file/provisioner.rb:5:in `provision'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/provision.rb:138:in `run_provisioner'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:95:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:510:in `hook'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/provision.rb:126:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/provision.rb:126:in `block in call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/provision.rb:103:in `each'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/provision.rb:103:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/machine.rb:239:in `action_raw'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/machine.rb:208:in `block in action'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:598:in `lock'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/machine.rb:194:in `call'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/machine.rb:194:in `action'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/provision/command.rb:30:in `block in execute'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/plugin/v2/command.rb:238:in `block in with_target_vms'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/plugin/v2/command.rb:232:in `each'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/plugin/v2/command.rb:232:in `with_target_vms'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/provision/command.rb:29:in `execute'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/cli.rb:54:in `execute'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:275:in `cli'
/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant:156:in `<main>'
 INFO interface: error: Vagrant failed to determine the shell expansion of a guest path
(probably for one of your shared folders). This is an extremely rare
error case and most likely indicates an unusual configuration of the
guest system. Please report a bug with your Vagrantfile and debug log.```