Comments (13)
You need to use a scheduled task to elevate to true admin privileges. The Chef provisioners in vagrant-windows do this automatically for you, the others do not.
from vagrant-windows.
@sneal I've gone over this with @ferventcoder and it actually appears to work on some baseboxes but not others... (same exact powershell script and Vagrantfile) so it appears to possibly be more of locking down the exact steps for configuring a winrm basebox properly. @ferventcoder's basebox includes ssh so the thought is maybe the script is working on his because its using ssh vs winrm? Trying to properly diagnose this for consistent basebox builds.
chocolatey/puppet-chocolatey-handsonlab#5
So you think using scheduled task is still the answer here?
Any idea when the other provisioners will support elevated privs? Documentation appears that elevated is default.
from vagrant-windows.
Using SSH is going to behave completely differently than WinRM - security, environment, and limitations. For non-trivial software installs SSH is even more problematic than WinRM.
If you want installers to behave like they do when running locally on the box the most reliable and consistent way is to use a scheduled task - regardless of transport.
from vagrant-windows.
ok but since it works on some base boxes and doesn't on others there has to
be a difference being met in the vagrant-windows requirements that's
unclear. anyone able to pull down that repo and help me understand the
underlying issue with the basebox? (base_setup.ps1 as you see handles all
the requirements so there must be something missing)
from vagrant-windows.
I use Packer to build my base boxes. The Autounattend.xml here does something very similar to what your base_setup.ps1 script does.
I haven't seen a consistent way to install all Windows software over SSH or WinRM without the scheduled task trickery. If you figure out a better way that would be awesome.
from vagrant-windows.
I also shut off UAC. Perhaps that's the difference?
from vagrant-windows.
It appears you are installing .net framework 4.0. The next version of choco will install it automatically. It should be out soon. Be aware that it will assert privileges if UAC is turned on. So it's likely to fail in an automated fashion unless you have UAC turned off.
_sigh_ - UAC was built to be secure but there is no sudo, so it's somewhat useless for those who would script installation.
from vagrant-windows.
@ferventcoder the base_setup.ps1 disables UAC along with complex passwords and a bunch of other things https://github.com/cdenneen/vagrant-windows-build/blob/master/base_setup.ps1
from vagrant-windows.
Dumb question from me, is there a reboot after UAC is disabled?
from vagrant-windows.
bottom of the ps1 it restarts the computer... then i create basebox...
from vagrant-windows.
@cdenneen I just starred that. I need some of those items to packerize my boxes :)
from vagrant-windows.
@ferventcoder well maybe looking at that you can see something I missed to make my basebox like yours (that works with .NET ps1 install?)... I do a base install of windows, run that script (actually going to modify that to do the administrator -> vagrant user rename and password) and create box.
from vagrant-windows.
I don't yet see what could cause it unfortunately.
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
- 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.