Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyper-v error #403

Closed
lcc2207 opened this issue May 30, 2019 · 3 comments
Closed

hyper-v error #403

lcc2207 opened this issue May 30, 2019 · 3 comments

Comments

@lcc2207
Copy link

lcc2207 commented May 30, 2019

I have tested vagrant on WSL and with kitchen-vagrant I the following error:
I have also tested copying the Vagrant file from .kitchen/kitchen-vagrant and running vagrant up and it works ok as well.
Error:
-----> Starting Kitchen (v2.2.5)
-----> Creating ...
/root/.chefdk/gem/ruby/2.6.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout/unix.rb:340: warning: Insecure world writable dir /c/Program Files/Oracle/VirtualBox in PATH, mode 040777
/opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /c/Program Files/Oracle/VirtualBox in PATH, mode 040777
Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Verifying Hyper-V is accessible...
==> default: Importing a Hyper-V instance
default: Creating and registering the VM...
An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

   Script: import_vm.ps1
   Error:

   'kitchen-test1-default-centos-7-f83f5d9c-2cee-4d5d-b5d0-ffc94e291762' failed to realize. (Virtual machine ID DB2640DF-9004-4878-BEC9-D18E2B57ABCB)

   Failed to access configuration store: The file name is too long. (0x8007006F).

------Exception-------
Class: Kitchen::ActionFailed
Message: 1 actions failed.
Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider hyperv ----
STDOUT: Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Verifying Hyper-V is accessible...
==> default: Importing a Hyper-V instance
default: Creating and registering the VM...
STDERR: /root/.chefdk/gem/ruby/2.6.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout/unix.rb:340: warning: Insecure world writable dir /c/Program Files/Oracle/VirtualBox in PATH, mode 040777
/opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /c/Program Files/Oracle/VirtualBox in PATH, mode 040777
An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: import_vm.ps1
Error:

'kitchen-test1-default-centos-7-f83f5d9c-2cee-4d5d-b5d0-ffc94e291762' failed to realize. (Virtual machine ID DB2640DF-9004-4878-BEC9-D18E2B57ABCB)

Failed to access configuration store: The file name is too long. (0x8007006F).
---- End output of vagrant up --no-provision --provider hyperv ----
Ran vagrant up --no-provision --provider hyperv returned 1] on default-centos-7


Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

@cheeseplus
Copy link
Contributor

The problem is a system level issue with the path and potentially name that kitchen generates. This requires some substantial reworking of the structure kitchen generates unique paths/names specifically for Windows based systems which is the only place we hit path length restrictions.

@xorima
Copy link
Member

xorima commented Aug 2, 2019

Opened #404 which should resolve this error

@tas50 tas50 closed this as completed Aug 6, 2019
@tas50
Copy link
Member

tas50 commented Aug 6, 2019

This is fixed in the latest release. Thanks for the report @lcc2207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants