Comments (8)
As a work around to this issue I was able to get a chef-solo provisioning work with the following modifications. These modifications take many of the extended features of vagrant away, but could be potentially a basis for how to override the vagrant functions in the in the vagrant-windows gem.
Modify the chef-solo.bat file
copy chef-solo.bat to chef-solo-orig.bat
rename chef-solo to chef-solo-orig
edit chef-solo.bat to be only the line "chef-solo-orig %3 %4". This strips the -c parameter from the vagrant call
Create a mklink.bat file
Create the file c:\windows\system32\mklink.bat
Place the line "echo Mounting %2 to %3 >> c:\Temp\mklink.log"
Create a solo.rb file
Create the file c:\etc\chef\solo.rb
Set cookbook_path "\\\\vboxsvr\\v-csc-1"
Set role_path "\\\\vboxsvr\\v-csr-2"
Set data_bag_path "\\\\vboxsvr\\v-csdb-3"
Set the following lines in the Vagrantfile
config.vm.share_folder "v-csc-1", "/tmp/vagrant-chef-1/chef-solo-1/cookbooks", "#{ENV['HOME'] || ENV['HOMEDRIVE']}/chef/chef-repo/cookbooks"
config.vm.share_folder "v-csr-2", "/tmp/vagrant-chef-1/chef-solo-2/roles", "#{ENV['HOME'] || ENV['HOMEDRIVE']}/chef/chef-repo/roles"
config.vm.share_folder "v-csdb-3", "/tmp/vagrant-chef-1/chef-solo-3/data_bags", "#{ENV['HOME'] || ENV['HOMEDRIVE']}/chef/chef-repo/data_bags"
Remove the following lines in the Vagrantfile
chef.cookbooks_path
chef.roles_path
chef.data_bags_path
This solution requires that v-csc-1 is set to cookbooks, v-csr-2 is set to roles and v-csdb-3 is set to data_bags
from vagrant-windows.
@leftathome Can you confirm this. I think that you are running on windows 2003 No?
from vagrant-windows.
Correct, this is windows server 2003. I should rephrase that it's not chef that does not run on server 2003 it's the vagrant/vagrant-windows things that don't work on server 2003 because it's calling in to the OS to do mklink. The workaround I posted above is what I had to do to get chef-solo to run on a server 2003 vagrant box.
from vagrant-windows.
Unfortunately I can't confirm this as I don't have a 2003 image handy. Our test framework is 2008R2-centric and concerned primarily with getting chef-client to run on a node. Version-specific features can be added via distro_dispatch without resorting to even more monkey-patching -- I added 2003 just as an example. Should be possible to patch in support for just about any other version of Windows.
@moserke, you might want to give my fork of this module a try and see if it fixes anything for you ... or, at least, that it's easier to work on.
It might not be, since you're using chef-solo and I'm using chef-client, but it might be worth a try anyway. (Good luck!)
from vagrant-windows.
@moserke It seems that using junction (from sysinternals) *could solve this problem. Are you interested in making a PR for it?
from vagrant-windows.
@moserke I am considering simply not supporting windows 2003. The problem that I run into is that I do not use windows 2003 in any of my environments and hence I do not have the testing resources to maintain this. I certainly would not be in objection to accepting a pull request that addresses this incompatibility. If I where implementing this, I would probably do a P/Invoke for creating junctions from powershell and add it to the resource script.
from vagrant-windows.
Yeah, the issue with this is that server 2003 does not allow remote paths/UNCs in their junctions. So although you can create the junction you can not map it to the virtualbox \vboxsvr path. I think we may have hit a wall on getting this fully supported in the same mode as server 2008. Maybe just putting a "Server 2003 Not Supported" is sufficient, people won't try that way. Besides, it's a ten year old OS right. :-)
from vagrant-windows.
Updated the README with the supported operating systems. Thanks for the feedback.
from vagrant-windows.
Related Issues (20)
- Use Schedule.Service to run Chef Task HOT 5
- [1.5.1] Unknown configuration section 'windows' HOT 2
- Access Denied trying to change winrm configuration during provisioning HOT 4
- Vagrant 1.5 warnings HOT 14
- Rename should force reboot HOT 3
- [vagrant 1.5.1] Using rsync with vagrant-windows fails HOT 1
- Install .NET framework via powershell through shell provider not working HOT 13
- Configurating network adapter failed when NON-ASCII adapter name used. HOT 16
- Vagrant-login 0.9.0 not found HOT 3
- Stuck on Waiting for VM to boot. HOT 20
- Error Configuring and enabling network interfaces HOT 2
- vagrant rdp HOT 1
- Upgrade path to 1.6 HOT 2
- Windows 2008/Powershell 1.0 file manager support HOT 4
- Setting synched folder to create a network drive doesn't work HOT 2
- Shell Provisioning Stalling HOT 1
- Why is Vagrant 1.7.4 insisting on having vagrant-windows installed when it's deprecated? HOT 1
- Unable to install vagrant-windows on vagrant 1.8.6 HOT 4
- chef seems to be running under the wrong user
- Vagrant - VirtualBox - Windows Server 2012 - Sysprep Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrant-windows.