-
Notifications
You must be signed in to change notification settings - Fork 905
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
Installing choco on Windows 10 Vagrant box stops Vagrant from being able to manage the box #834
Comments
ModernIE boxes are available in Windows 10 flavor? |
What version of Vagrant? What version of VirtualBox? |
Since I've never seen this before (I use vagrant all the time in OS X), please share your Vagrantfile and provisioning scripts so I can attempt to reproduce the issue. |
@ferventcoder Yup, windows 10 is available. The guys over at win WinRb/winrm-fs#18 (comment) have just told me that the latest version of their plugin 0.4.3 fixes this issue so it's something on their end. Vagrant 1.8.4 ships with 0.3.2 so I'll need to look into updating it manually for now. |
I have the same problem, worked fine with Vagrant 1.8.1, but it seems that while provisioning chocolatey vagrant aborts. I'm using Windows Server 2016 TP5 and Windows 10 as guest VM's. I also try to update winrm-fs... |
I'm also seeing this problem with Vagrant 1.8.4 and choco 0.9.10.3. Works fine with choco 0.9.9.12. |
@StefanScherer were you still seeing this after upgrade? @rgl what specifics can you provide? |
@ferventcoder Updating winrm-fs worked only with a hack in vageant 1.8.4 described in hashicorp/vagrant#7526 and it worked for Chocolatey installation. But then I had other issues provisioning a domain controller. So I switched back to Vagrant 1.8.1 without updating winrm-fs. |
So one thing we'll be looking at is #833. We could also explore not installing the profile in the case of SYSTEM performing the installation and other reasons. As far as a progress bar, I'm not sure what may be causing that. |
@ferventcoder I've placed the environment at https://github.com/rgl/choco-0.9.10.3-not-working-with-vagrant. The error that is gives is the same as the one reported on this issue. Please note that you have to install Windows 10 and all the updates (it will takes ages to install thou). |
One thing mentioned that sticks out to me is that some install may be affecting the WinRM settings and resetting them on an upgrade, WinRb/winrm-fs#18. One of the things that was done by Boxcutter in the example repository was to disable the Windows Update service until it was required in the unattend.xml because its installs can mess with other software by setting the reboot required flag and changing/resetting settings. The last step on an install/provision may need to be to "reinforce" the WinRM settings that existed prior to the choco/package upgrade. |
@StefanScherer On the Win2012R2 box where you didn't have the errors, had you upgraded to PowerShell 5 at that point, or was it still on the default PowerShell 4? I'm noticing that this issue only occurs on PowerShell 5 + the newer Chocolatey, but it's happening to me on Win2012R2 as well since I upgraded to PowerShell 5. |
@dragon788 You're right. The windows_2012_r2 (from packer-windows repo) has PowerShell 4 installed.
A provision script iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) works fine, the next shell provision script still works fine. Spinning up a 2016 TP5 VM crashes before the second provision script is started.
For TP5/Win10 - PowerShell 5 VM's - I use this provision script as a workaround: iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
rm $PROFILE |
So adding the profile bits is the issue, this is related to #833 |
Or more specifically where when SYSTEM is running, we don't automatically add the profile. |
Adding |
AFAIK the profile only adds tab completion for the choco commands. But haven't looked into it deeper. |
And |
Alright, so this should be resolved with #833 changes.
|
Just a note, this also affected Win2012R2 boxes, but I think basically any box with PowerShell 5 + Chocolatey was affected. |
This is fixed in 0.10.0. Would someone provide a 👍 or 👎 on whether they are still running into this or a similar issue? Thanks! |
working fine at https://github.com/rgl/choco-0.9.10.3-not-working-with-vagrant :-) also works with Windows 2012 R2. |
Works fine with a TP5 VM. Just removed my workaround StefanScherer/docker-windows-box@1bad1fc 👍 |
Thanks folks! |
What You Are Seeing?
After running the choco install script on a windows 10 Vagrant box, something on the box is affected which prevents Vagrant from managing/provisioning the box (by way of pushing PowerShell scripts onto the box and running them), the box must be destroyed.
Any subsequent provisioning calls to the box (straight after or on a reboot) fail with winrm-fs errors (see below).
What is Expected?
To install choco on a vagrant box without affecting Vagrant ability to manage the box.
How Did You Get This To Happen? (Steps to Reproduce)
OS X El Capitan
Install Vagrant and VirtualBox
Download last ModernIE windows Vagrant Box from Microsoft
Bring the box up with default options
Enable WinRM
Install choco via
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
on Vagrant boxTry and complete provisioning or just simply reload the box
Output Log
The text was updated successfully, but these errors were encountered: