Code Monkey home page Code Monkey logo

chocolatey-test-environment's People

Contributors

cfoellmann avatar dtgm avatar ferventcoder avatar franklinyu avatar gep13 avatar jordandoerksen avatar mistuke avatar mkevenaar avatar mwrock avatar pauby avatar peterdavehello avatar stefanscherer avatar tirolo avatar webprofusion-chrisc avatar windos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chocolatey-test-environment's Issues

Missing the Code of Conduct

Hello, this project is currently missing the Code of Conduct. If you are interested in adding one, then please let me know so that I can add a PR for that. Also, in that case, I would also need an address (email address) for adding that in the Code of Conduct file.

Instructions not working

I really have no idea how Vagrant works, but walking through the instructions apparently isn't enough:

PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
PS C:\chocolatey-test-environment> vagrant sandbox rollback
[default] Rolling back the virtual machine...
VBoxManage.exe: error: Machine '0a9cbe89-3445-43eb-a029-bb0e81a53035' is not currently running
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
PS C:\chocolatey-test-environment> vagrant halt
==> default: Attempting graceful shutdown of VM...
    default: Guest communication could not be established! This is usually because
    default: SSH is not running, the authentication information was changed,
    default: or some other networking issue. Vagrant will force halt, if
    default: capable.
==> default: Forcing shutdown of VM...
PS C:\chocolatey-test-environment> vagrant destroy
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Cloning VM...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Setting the name of the VM: chocolatey-test-environment_default_1550549316175_62876
==> default: Fixed port collision for 5985 => 5985. Now on port 2250.
Vagrant found a port collision for the specified port and virtual machine.
While this port was marked to be auto-corrected, the ports in the
auto-correction range are all also used.

VM: default
Forwarded port: 3389 => 3389
PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.

vagrant destroy didn't appear to actually destroy anything. How can I back out entirely and start again? (and will that make any difference, or do I need to be fixing something else?)

The following WinRM command responded with a non-zero exit status

Hey Guys,

I'm unsure why when testing choco packages that exit in a 3010 I get the following error:

The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file "c:\tmp\vagrant-shell.ps1"

Stdout from the command:

Error message:
https://gist.github.com/shaun-rutherford/083400876d203e59a48f45e08f162efe

Vagrantfile:
https://gist.github.com/shaun-rutherford/a5c6c3e70a383d79f644f707e2c7b6da

The package passes if I install it once, reload the box and install it again. This is not really Ideal though as the install process takes ~15 mins each time.

I've tried doing a reload in advance but that doesn't work either.

Any assistance would really be appreciated.

Warning: Authentication failure

I'm having trouble to get a working test environment, working as a local administrator on the host in question.

Windows 10 Pro 1803 (patched-to-date)
Vagrant 2.1.5
VirtualBox 5.2.18 r124319
VirtualBox Extension Pack 5.2.18 r124319

I forked/cloned chocolatey-test-environment yesterday, so have a fresh copy.

When I do:

vagrant up

A Windows Server 2012 R2 DC vm is launched/booted. But I start seeing default: Warning: Authentication failure. Retrying... And eventually, Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period.

See screenshot

I thought installing VirtualBox Guest Additions in the VM may be the key, but that made no difference, even after doing:

vagrant suspend
vagrant halt
vagrant up

I also tried

vagrant suspend
vagrant halt
vagrant destroy
vagrant up

It didn't help. Any suggestions would be appreciated!

Chocolatey install - Could not create SSL/TLS secure channel

Hi everybody, I hope you all have a great day ๐Ÿ™‚

I submit this issue to you because I have a problem with the installation of Chocolatey on the test environnement. Indeed, when running the command vagrant provision to run test a package, I end up with the following error :

==> default: Running provisioner: shell...
    default: Running: shell/InstallChocolatey.ps1 as c:\tmp\vagrant-shell.ps1
    default: Exception calling "DownloadString" with "1" argument(s): "The request was 
    default: aborted: Could not create SSL/TLS secure channel."
    default: At C:\tmp\vagrant-shell.ps1:70 char:7
    default: +       iex ((new-object 
    default: net.webclient).DownloadString('https://chocolatey.org/ins ...
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default: ~~~
    default:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    default:     + FullyQualifiedErrorId : WebException
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, 
    default: script file, or operable program. Check the spelling of the name, or if a path 
    default: was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:78 char:1
    default: + choco feature enable -n autouninstaller
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFou 
    default:    ndException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, 
    default: script file, or operable program. Check the spelling of the name, or if a path 
    default: was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:79 char:1
    default: + choco feature enable -n allowGlobalConfirmation
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFou 
    default:    ndException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, 
    default: script file, or operable program. Check the spelling of the name, or if a path 
    default: was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:80 char:1
    default: + choco feature enable -n logEnvironmentValues
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFou 
    default:    ndException
    default:     + FullyQualifiedErrorId : CommandNotFoundException

Here are the information of my setup:

  • Vagrant, version 2.2.7
  • VirtualBox, version 6.1.2 r135662
  • Chocolatey, version 0.10.15

This is my first package, so I may have some element not setup correctly triggering this error.
For information, I currently try to upgrade the conan package.

Thank you all for your attention,
I hope you can help me with this issue so that I can finally finish upgrading conan package ๐Ÿ˜„

Support dotnet3.5 and other server features

I have a package that depends on the dotnet3.5 package, which uses DISM, as it's a "feature" of most Windows versions now. However, it fails dramatically on this box. I'll snip around the nasty XML output that's dumped to the console.

> choco install -y dotnet3.5
...

Deployment Image Servicing and Management tool
Version: 6.3.9600.16384

Image Version: 6.3.9600.16384

Enabling feature(s)

Error: 0x800f0906

The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more informa
tion on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.
...

ERROR: Running ["C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" cmd.exe /c DISM /Online /NoRestart /Enable-
Feature /FeatureName:NetFx3] was not successful. Exit code was '1'. See log for possible error messages.
The install of dotnet3.5 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\DotNet3.5\Tools\ChocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
 - dotnet3.5 (exit code 1)

When I log onto the box and try to enable the feature manually, I get a similar nasty error.

image

And

[127.0.0.1]: PS C:\Users\Administrator\Documents> Add-WindowsFeature Net-Framework-Core
Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
    Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindowsF
   eatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             Failed         {}

Looks like it was specifically removed from the box? Maybe it's removed by default.

[127.0.0.1]: PS C:\Users\Administrator\Documents> Get-WindowsFeature Net-Framework-Core

Display Name                                            Name                       Install State
------------                                            ----                       -------------
    [ ] .NET Framework 3.5 (includes .NET 2.0 and 3.0)  NET-Framework-Core               Removed

I can set a source manually if I have the install media (I don't, I guess I could download it). I don't know if the dotnet3.5 package supports alternate sources.

Should we install this feature by default or leave the sources on the local disk or something?

Vagrant 2.2.2 detects vulnerability with VM and the E1000 NIC

Upgraded to Vagrant v2.2.2 and receive this warning

==> default: Vagrant has detected a configuration issue which exposes a
==> default: vulnerability with the installed version of VirtualBox. The
==> default: current guest is configured to use an E1000 NIC type for a
==> default: network adapter which is vulnerable in this version of VirtualBox.
==> default: Ensure the guest is trusted to use this configuration or update
==> default: the NIC type using one of the methods below:
==> default:
==> default:   https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type
==> default:   https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type

The request was aborted: Could not create SSL/TLS secure

Just started having this problem today.

==> default: Running provisioner: shell...
    default: Running: shell/InstallChocolatey.ps1 as C:\tmp\vagrant-shell.ps1
    default: powershell.exe : Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
    default:     + CategoryInfo          : NotSpecified: (Exception calli...SSL/TLS secure :String) [], RemoteException
    default:     + FullyQualifiedErrorId : NativeCommandError
    default: channel."
    default: At C:\tmp\vagrant-shell.ps1:70 char:7
    default: +       iex ((new-object net.webclient).DownloadString('https://chocolatey.org/ins ...
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    default:     + FullyQualifiedErrorId : WebException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:78 char:1
    default: + choco feature enable -n autouninstaller
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:79 char:1
    default: + choco feature enable -n allowGlobalConfirmation
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
    default: choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    default: the spelling of the name, or if a path was included, verify that the path is correct and try again.
    default: At C:\tmp\vagrant-shell.ps1:80 char:1
    default: + choco feature enable -n logEnvironmentValues
    default: + ~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    default:     + FullyQualifiedErrorId : CommandNotFoundException
    default:
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file "C:\tmp\vagrant-shell.ps1"

Stdout from the command:



Stderr from the command:

powershell.exe : Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
    + CategoryInfo          : NotSpecified: (Exception calli...SSL/TLS secure :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
channel."
At C:\tmp\vagrant-shell.ps1:70 char:7
+       iex ((new-object net.webclient).DownloadString('https://chocolatey.org/ins ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:78 char:1
+ choco feature enable -n autouninstaller
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:79 char:1
+ choco feature enable -n allowGlobalConfirmation
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\tmp\vagrant-shell.ps1:80 char:1
+ choco feature enable -n logEnvironmentValues
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Virtualbox-guest-editions-error

Not sure if this is the right place to report issues while installing packages, but, ...

I ran into error and failure to install VB-GuestEditions.

Choco: Latest
VB: 6.0.12
Currently installed guest-editions: 6.0.8

image

Provide guidance on Vagrant Box version management

Assuming there's multiple versions of the test environment's official Vagrant box available, then documentation should be included to cover:

  1. Updating the Testing Environment
  2. Selecting the desired box version to use

Clipto Pro 2.4.0 fails to install inside Chocolatey-test-environment

It has worked wit Clipto Pro 2.2.2.

The same Chocolatey Package for Clipto Pro fails with the version 2.4.0 with the Chocolatey-Test-Environment but is successful on my Windows 10 computer:

#### INSTALLED WITH CHOCOLATEY ####
C:\Users\Administrator>cinst clipto-pro.install -pre --version=2.4.0
Chocolatey v0.10.15
Installing the following packages:
clipto-pro.install
By installing you accept licenses for the packages.
Progress: Downloading clipto-pro.install 2.4.0... 100%

clipto-pro.install v2.4.0 - Possibly broken
clipto-pro.install package files install completed. Performing other installatio
n steps.
Downloading clipto-pro.install
from 'https://github.com/clipto-pro/Desktop/releases/download/v2.4.0/clipto.pr
o-2.4.0.exe'
Progress: 100% - Completed download of C:\Users\Administrator\AppData\Local\Temp
\1\chocolatey\clipto-pro.install\2.4.0\clipto.pro-2.4.0.exe (43.85 MB).
Download of clipto.pro-2.4.0.exe (43.85 MB) completed.
Hashes match.
Installing clipto-pro.install...
ERROR: Running ["C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\clipto-p
ro.install\2.4.0\clipto.pro-2.4.0.exe" /S ] was not successful. Exit code was '-
1073741819'. See log for possible error messages.
The install of clipto-pro.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\clipto-pro.install\tools\choc
olateyinstall.ps1'.
See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • clipto-pro.install (exited -1073741819) - Error while running 'C:\ProgramData
    \chocolatey\lib\clipto-pro.install\tools\chocolateyinstall.ps1'.
    See log for details.
    ----> Result: Clipto is not installed.

#### INSTALLED OUTSIDE CHOCOLATEY ####
C:\Users\Administrator>"C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\c
lipto-pro.install\2.4.0\clipto.pro-2.4.0.exe" /S
----> Result: Clipto is installed.

Couple thoughts...

Thanks so much for setting this up!

On this item: "Hyper-V may need to be disabled for Virtualbox to work properly if your computer is a Windows box." - I know you can't run VMWare and Hyper-V, but I've never had troubles with Virtual Box with Hyper-V enabled on Win 8.1 and 10. Maybe if there have been known observed cases of conflict change this to "Although rare, in some cases Hyper-V may need to be disabled for Virtualbox to work properly on Windows."

Would be great to show the actual git clone command somewhere and give it a sample folder for the rest of the doc. Like this:

git clone https://github.com/chocolatey/chocolatey-test-environment.git c:\users\public\chocolatey-test-environment

OR

git clone https://github.com/chocolatey/chocolatey-test-environment.git

chocolatey-test-environment broken with VirtualBox 5.2.22

Upgraded to VirtualBox Version 5.2.22 r126460 (Qt5.6.3) on macOS 10.12.6 and the VM networking does not work. In fact, the 2012 VM does not even detect a network interface.

menubar_and_chocolatey-test-environment_default_1543249167931_27622__running__and_new_issue_ _chocolatey_chocolatey-test-environment

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Cloning VM...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' is up to date...
==> default: Setting the name of the VM: chocolatey-test-environment_default_1543249167931_27622
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 5985 (guest) => 5985 (host) (adapter 1)
    default: 3389 (guest) => 3389 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
    default: 5986 (guest) => 55986 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 127.0.0.1:5985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
$ vagrant box outdated
Checking if box 'ferventcoder/win2012r2-x64-nocm' is up to date...
$ vagrant box update
==> default: Checking for updates to 'ferventcoder/win2012r2-x64-nocm'
    default: Latest installed version: 1.0.0
    default: Version constraints:
    default: Provider: virtualbox
==> default: Box 'ferventcoder/win2012r2-x64-nocm' (v1.0.0) is running the latest version.
$ git pull upstream master
From https://github.com/chocolatey/chocolatey-test-environment
 * branch            master     -> FETCH_HEAD
Already up to date.
$ vagrant --version
Vagrant 2.2.1

Old VirtualBox version requirement

The "suggestion" for using VirtualBox 4.x (rather than 5.x) seems really outdated. Although there is a 4.3.40 package that was put out there just a couple weeks ago, the last previous 4.x release was almost 2 years ago with many 5.x releases since then.

I already have several VMs happily running in v5.2. I'd prefer to avoid the need to scrap those, uninstall VirtualBox, and install what seems reasonable to assume is a "less modern" version just so I can occasionally test a package that behaves for me on other VMs but fails automated testing. At the same time, I am stuck with packages that can't be approved because they fail.

While I am (just barely) astute enough to install and use VirtualBox, I am not well versed on it. I really don't know how the changes from 4 to 5 may have impacted things. What are the implications of using the Chocolatey-test-environment with v5, and what are the chances that the test environment can be updated to work with VirtualBox 5.x?

Thanks.

using hyperv provider, can not read files in /packages share

By using the hyperv provider for vagrant, I am unable to read files in the /packages share. I can see and list (dir) the files, but I can not read the files.

Setup

  • Windows 10 pro ver 1903 (Version 10.0.18362.175)
  • hyperv installed and working across multiple other things (hyperv itself, docker, etc.)
  • Vagrant 2.2.4

Repo

  1. Setup as per instructions at https://github.com/chocolatey-community/chocolatey-test-environment/blob/master/ReadMe.md except for the following:
    • No Virtualbox -- we will be using the hyperv box and provider
    • No plugin sahara -- this is unneeded for this issue
  2. vagrant winrm -e -s powershell -c "copy c:/packages/*.* c:/"

Result

copy : Could not find file 'C:\packages\ReadMe.md'.
At C:\windows\temp\winrm-elevated-shell-fff58481-a970-493f-9281-4d343fbfd9b2.ps
1:1 char:1
+ copy c:/packages/*.* c:/
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-Item], FileNotFoundExcep
   tion
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerS
   hell.Commands.CopyItemCommand

Expected

No errors and the Readme.md file to be copied.

Notes

Listing files succeeds like this:

vagrant winrm -e -s powershell -c "dir C:/packages/"
    Directory: C:\packages
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---         6/19/2019  12:05 AM        113 ReadMe.md

All attempts to read the files (like readme.md) usign different methods results in similar errors. For example, editing the Vagrantfile to have a provision command type c:/packages/ReadMe.md results in the error:

==> default: Running provisioner: shell...
    default: Running: inline PowerShell script
    default: SUCCESS: Specified value was saved.
    default: Testing package if a line is uncommented.
    default: type : Cannot find path 'C:\packages\ReadMe.md' because it does not exist.
    default: At C:\tmp\vagrant-shell.ps1:16 char:1
    default: + type c:/packages/ReadMe.md
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : ObjectNotFound: (C:\packages\ReadMe.md:String) [
    default:    Get-Content], ItemNotFoundException
    default:     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo
    default:    ntentCommand

Manipulating the permissions on the packages folder and files on the host did not resolve the problems. I added full access to Everyone and yet the files can be seen, but can not be read.

In ba95e7d the hyperv provider and box was added. Was the read of local packages in the /packages share tested? If so, are there setup/permission/file requirements to get it to work?

Error: Could not find a part of the path 'C:\ProgramData\chocolatey\config\chocolatey.config'

After following the setup instructions and using a Virbualbox 4.3 release, I get errors while running vagrant provision:

==> default: Error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings:
==> default:
==> default: Could not find a part of the path 'C:\ProgramData\chocolatey\config\chocolatey.config'.
==> default: Could not find a part of the path 'C:\ProgramData\chocolatey\config\chocolatey.config'.
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file c:\tmp\vagrant-shell.ps1

Stdout from the command:

Stderr from the command:

Support for parameters

While it is desirable to not require parameters, sometimes it is necessary. I have a package that requires a password and there is no way to pass that information to test environment.

I would like to propose support for a properties file e.g., tools\choco_test.properties that is optional and would be converted to --params "''" automatically before executing the command.

Vagrantfile no longer works with virtualbox

Update to date clone, the vagrant file cannot find the virtualbox box to download

>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'chocolatey/test-environment' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'chocolatey/test-environment'
    default: URL: https://vagrantcloud.com/chocolatey/test-environment
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.

Name: chocolatey/test-environment
Address: https://vagrantcloud.com/chocolatey/test-environment
Requested provider: [:virtualbox]

It looks like only the hyper-v version has been released.

image

Why does vagrant display error if no package is tested?

Write-Output "Testing package if a line is uncommented. Otherwise you will see an error."

why vagrant do that?

Vagrantfile https://github.com/chocolatey/chocolatey-test-environment/blob/master/Vagrantfile#L95-L108

$ErrorActionPreference = "Stop"
$env:PATH +=";$env:SystemDrive\\ProgramData\\chocolatey\\bin"
Write-Output "Testing package if a line is uncommented. Otherwise you will see an error."
# THIS IS WHAT YOU CHANGE
# - uncomment one of the two and edit it appropriately
# - See the README for details
#choco.exe install -fdvy INSERT_NAME --version INSERT_VERSION  --allow-downgrade
#choco.exe install -fdvy INSERT_NAME  --allow-downgrade --source "'c:\\packages;http://chocolatey.org/api/v2/'"
# vagrant has issues knowing that there was an error
if ($LASTEXITCODE -ne 0) {
  exit 1
}

vagrant provision output

PS C:\dev\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
    default: Running: shell/PrepareWindows.ps1 as c:\tmp\vagrant-shell.ps1
==> default: IE Enhanced Security Configuration (ESC) has been disabled.
==> default: IE first run welcome screen has been disabled.
==> default: Setting Windows Update service to Manual startup type.
==> default: Running provisioner: shell...
    default: Running: shell/InstallNet4.ps1 as c:\tmp\vagrant-shell.ps1
==> default: Running provisioner: shell...
    default: Running: shell/InstallChocolatey.ps1 as c:\tmp\vagrant-shell.ps1
==> default: Chocolatey v0.9.10-beta1-151-ga83d5c5
==> default: Nothing to change. Config already set.
==> default: Chocolatey v0.9.10-beta1-151-ga83d5c5
==> default: Nothing to change. Config already set.
==> default: Chocolatey v0.9.10-beta1-151-ga83d5c5
==> default: Nothing to change. Config already set.
==> default: Running provisioner: shell...
    default: Running: shell/NotifyGuiAppsOfEnvironmentChanges.ps1 as c:\tmp\vagrant-shell.ps1
==> default: 1
==> default:
==> default: SUCCESS: Specified value was saved.
==> default: Running provisioner: shell...
    default: Running: inline PowerShell script
==> default: Testing package if a line is uncommented. Otherwise you will see an error.
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file c:\tmp\vagrant-shell.ps1

Stdout from the command:



Stderr from the command:


Documentation error: [verifier service]()

There's a broken link in the ReadMe.md and I don't know where to point the link.

There are a couple of difference between the [verifier service]() and this environment.

CategoryInfo: OperationStopped: (:) [], ArgumentException

Very weird. I did not recall changing anything.

==> default: Running provisioner: shell...
    default: Running: shell/PrepareWindows.ps1 as c:\tmp\vagrant-shell.ps1
    default: (10,8):UserId:
    default: At line:72 char:1
    default: + $folder.RegisterTaskDefinition($task_name, $task, 6, $username, $pass ...
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : OperationStopped: (:) [], ArgumentException
    default:     + FullyQualifiedErrorId : System.ArgumentException
    default: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
    default: At line:74 char:1
    default: + $registered_task = $folder.GetTask("\$task_name")
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : OperationStopped: (:) [], FileNotFoundException
    default:     + FullyQualifiedErrorId : System.IO.FileNotFoundException
    default: You cannot call a method on a null-valued expression.
    default: At line:75 char:1
    default: + $registered_task.Run($null) | Out-Null
    default: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    default:     + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    default:     + FullyQualifiedErrorId : InvokeMethodOnNull

Support `choco verify mypackage.1.1.0.nupkg`

Support choco verify mypackage.1.1.0.nupkg

I have been resubmitting my package but have failed verification with little information on why installation test failed. It would be nice if choco CLI support this command. This uploads the package to test environment, run verification then return results right away with rich enough information on why it failed.

choco verify mypackage.1.1.0.nupkg

A setup guide with docker-compose would also be nice.

Add back in Hyper-V provider

As of v3.0.0, the Hyper-V box was removed, so the Hyper-V provider no longer works as is.
Converting the Virtualbox image to Hyper-V is possible, but is an undocumented, potentially painful process.

Given that Virtualbox does not fully work when Hyper-V is enabled (which includes WSL 2, Windows Sandbox, and Credential/Device Guard), having a Hyper-V box would be useful and would reduce testing friction for some maintainers.

VBoxManage: error: Unknown option: --clipboard

Using the an unchanged Vagrantfile vagrant/virtualbox throws an error

$ vagrant up --provider  virtualbox
<snip>
["modifyvm", :id, "--clipboard", "bidirectional"]

The following error was experienced:

#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "c553546c-59f4-4524-957e-05ef4a7bda54", "--clipboard", "bidirectional"]

$ vagrant --version
Vagrant 2.2.6

$ VBoxManage --version
6.1.0r135406

Maybe this is the problem?
https://forums.virtualbox.org/viewtopic.php?f=6&t=95992

What's odd, if I REMOVE this line

v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]

from the Vagrantfile I still get the error

FEATURE REQUEST: screenshot upon install failure saved along with gist

I've bumped into:

2019-03-07 01:49:44,741 2536 [WARN ] - Chocolatey timed out waiting for the command to finish. The timeout
specified (or the default value) was '2700' seconds. Perhaps try a
higher --execution-timeout? See choco -h for details.

...too numerous amount of times to mention.

A screenshot at that moment of failure would be immensely helpful to package maintainers who didn't expect a pop up request to install a dependency or a reboot request etc.

The port chosen for WinRM is in reserved range

PS C:\Users\Jakub> netsh interface ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
      5357        5357
     50000       50059     *
     51940       52039
     52040       52139
     55954       56053
     56054       56153
     56154       56253
     56254       56353
     56354       56453
     56454       56553
     56654       56753
     56754       56853
     56854       56953
     56954       57053
     57054       57153
     57154       57253

* - Administered port exclusions.

This means that this port can't be bound at all which causes vagrant up due to timeout while trying to connect through WinRM as that never ends up getting bound.

In general, I would suggest choosing ports that are within user ports range (1024-49151) to avoid these kind of problems.

Print spooler disabled - purposefully or bug?

REF: https://groups.google.com/forum/#!searchin/chocolatey/spooler%7Csort:date/chocolatey/v50KZuRRjjw/N6CB352XCgAJ
REF: https://groups.google.com/forum/#!searchin/chocolatey/spooler%7Csort:date/chocolatey/uOHpAx7j_Xs/sWDfzsa3HAAJ

The print spooler is disabled by default in the Chocolatey Test Environment. Is this purposeful or an oversight?

This seems to be a bug to me as the Print Spooler service would be set to Automatic in real world OOTB default Windows configurations.

Glasswire update fail verification

I have recently became a maintainer of the 'glasswire' package. Its download was hardcoded to always point to the newest version, so any changes broke the checksum.

I updated the checksum and rebuilt the nupkg.

The nupkg failed first verification here:
https://gist.github.com/choco-bot/aa8fd0bf1f4f1625b26dee1ea9871cbf

The first block made me think it needed VC++ redist 2015 so I added it as a dependancy and resubmitted.

Current failure here:
https://gist.github.com/7595613a3f972a892d5f20d2311a1d94

Any assistance in getting to the bottom of this would be appreciated.

FYI: Strangely it only installed correctly when installing in the form
choco install glasswire -source path

AND not install glasswire 2.1.152.nupkg (it would still use old checksum)

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.