Vagrant: error with vagrant package --vagrantfile

Created on 5 Jun 2018  ยท  10Comments  ยท  Source: hashicorp/vagrant

Hello all,

I'm having a problem when i am creating my custom package with include vagrantfile.

If i create a new package without the --vagrantfile option, all works fine, but if i use the --vagrantfile, i get this error into the "adding additional vagrantfile" step:

INFO runner: Running action: environment_unload #
C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/win32-file-security-1.0.10/lib/win32/file/security.rb:681:in chown': undefined methodwincode' for 0:Integer (NoMethodError)

I execute all the process in debug mode:

https://pastebin.com/cGrUBiwE

thanks!

core hoswindows needs-repro

Most helpful comment

Same here, also with --include

All 10 comments

Same problem. I am running VirtualBox 5.1.18 on a WIndows 7 (64bit) host machine, trying to package a Windows 10 Pro VM just created from an iso built from microsoft's "media creation tool" ISO creator. Vagrant version 2.1.1.

NOTE: same core error messsage as @briancain above:
C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/win32-file-security-1.0.10/lib/win32/file/security.rb:681:inchown': undefined method wincode' for 0:Integer (NoMethodError)

The output (without using --debug) is at https://pastebin.com/c7G0fvPC.
I can re-run with --debug if that would be helpful.

Regardless of error, thanks and good karma to all the smart Vagrant coders. :)

Same Problem here, slightly older Version of Vagrant, though (installed late April/early May 2018, hope this hints at the exact version):
C:/HashiCorp/Vagrant/embedded/gems/2.0.4/gems/win32-file-security-1.0.10/lib/win32/file/security.rb:681:inchown': undefined method wincode' for 0:Integer (NoMethodError)

I also tried to package a Windows 10 Pro VM, not a fresh install though. My Workstation is Windows 10 1709.
I tried updating to the latest Version of Vagrant (2.1.1) to fix the issue but got the same error.
Downgrading to Vagrant Version 2.0.0 with Virtual Box 5.1.38 worked for me but I didn't try other builds.
Cheers!

Same here, also with --include

Thanks for the work-around, Northcraft. I've been stuck on it for a bit. This isn't an urgent project for us, so I may take a couple of days to try the vagrant file with various settings commented out to see if I can narrow down what exactly is causing the problem, or if it's just the inclusion of the vagrantfile in general.

OK - just as a follow up to this, I tried with a vagrantfile that had everything commented out and still got the error. It appears that this is an error with the inclusion of the file, not with a specific setting within the file.

I'm also getting this error, running on Windows 7, trying to package a Win10 VirtualBox VM, using Vagrant 2.1.1.

Same here. Working on Windows 10 and packaging an Ubuntu Server 18.04.
Vagrant 2.1.1 and VirtualBox 5.2.12 r122591

Same here Vagrant 2.1.1 and VirtualBox 5.2.8 (using the --vagrantfile option)
Was working before. The only change is that the box has been generated with the latest packer 1.2.4 instead of packer 1.2.3 but the update of the os (windows 10) is more likely to be what triggered the issue for me.

Hi there,

PR #9923 is included in the 2.1.2 release and should resolve this issue. There were issues encountered in various Windows environments where the win32 additions were not working correctly. The file modifications were replaced with powershell commands and should resolve the problems.

I'm going to close this up but if you still are having issues, we can either reopen this issue or a new one can be opened.

Cheers!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings