Git Product home page Git Product logo

Comments (13)

sneal avatar sneal commented on September 2, 2024

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.

cdenneen avatar cdenneen commented on September 2, 2024

@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.

sneal avatar sneal commented on September 2, 2024

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.

cdenneen avatar cdenneen commented on September 2, 2024

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.

sneal avatar sneal commented on September 2, 2024

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.

ferventcoder avatar ferventcoder commented on September 2, 2024

I also shut off UAC. Perhaps that's the difference?

from vagrant-windows.

ferventcoder avatar ferventcoder commented on September 2, 2024

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.

cdenneen avatar cdenneen commented on September 2, 2024

@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.

ferventcoder avatar ferventcoder commented on September 2, 2024

Dumb question from me, is there a reboot after UAC is disabled?

from vagrant-windows.

cdenneen avatar cdenneen commented on September 2, 2024

bottom of the ps1 it restarts the computer... then i create basebox...

from vagrant-windows.

ferventcoder avatar ferventcoder commented on September 2, 2024

@cdenneen I just starred that. I need some of those items to packerize my boxes :)

from vagrant-windows.

cdenneen avatar cdenneen commented on September 2, 2024

@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.

ferventcoder avatar ferventcoder commented on September 2, 2024

I don't yet see what could cause it unfortunately.

from vagrant-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.