Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Windows Guest Support for Generic Bucket (and others too?) #137

Closed
tknerr opened this issue Feb 3, 2015 · 4 comments
Closed

Windows Guest Support for Generic Bucket (and others too?) #137

tknerr opened this issue Feb 3, 2015 · 4 comments
Labels

Comments

@tknerr
Copy link

tknerr commented Feb 3, 2015

Not sure if this is a generic bucket specific issue or a general one.

Since I want caching by default I put this in my global ~/.vagrant.d/Vagrantfile:

Vagrant.configure("2") do |config|

  # enable cachier globally
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box

    # cache bussers for test-kitchen
    config.cache.enable :generic, {
      "busser" => { cache_dir: "/tmp/busser/gems" }
    }
  end
end

However, when I boot up a Windows VM, e.g.like so...

Vagrant.configure(2) do |config|
  config.vm.box = "tknerr/eval-win7x64-enterprise"
  config.vm.provider "virtualbox" do |vbox|
    vbox.gui = true
  end
end

...I get this error:

C:\Repos\_stash\vagrant-chef-excercises\04-vagrant-windows-boxes\solution\code>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
    default: The Berkshelf shelf is at "W:/home/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150203-9120-6wyuaf-default"
==> default: Importing base box 'tknerr/eval-win7x64-enterprise'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'tknerr/eval-win7x64-enterprise' is up to date...
==> default: Setting the name of the VM: code_default_1422993280514_36513
==> default: Fixed port collision for 22 => 2222. Now on port 2202.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3389 => 3389 (adapter 1)
    default: 5985 => 5985 (adapter 1)
    default: 22 => 2202 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/Repos/_stash/vagrant-chef-excercises/04-vagrant-windows-boxes/solution/code
    default: /tmp/vagrant-cache => W:/home/.vagrant.d/cache/tknerr/eval-win7x64-enterprise
==> default: Configuring cache buckets...
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

rm /tmp/busser/gems -recurse -force
if ($?) { exit 0 } else { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }

Stdout from the command:



Stderr from the command:

#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">Remove-Item : Cannot find path 'C:\tmp\busser\gems' because it does not exist._x000D__x000A_</S><S S="Error">At line:1 char:3_x000D__x000A_</S><S S="Error">+ rm &lt;&lt;&lt;&lt;  /tmp/busser/gems -recurse -force_x000D__x000A_</S><S S="Error">    + CategoryInfo          : ObjectNotFound: (C:\tmp\busser\gems:String) [Rem _x000D__x000A_</S><S S="Error">   ove-Item], ItemNotFoundException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov _x000D__x000A_</S><S S="Error">   eItemCommand_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>
@tknerr
Copy link
Author

tknerr commented Feb 3, 2015

Currently adding this to my windows box Vagrantfiles to disable the generic bucket:

...
  # disable the generic cache
  config.cache.enable :generic, {}
...

Actually it would be great if I could determine whether this vagrant execution is part of a test-kitchen run in the global Vagrantfile, so taht I enable the "busser" generic cache dir only in this case...

@fgrehm
Copy link
Owner

fgrehm commented Feb 4, 2015

Disabling a specific bucket will be implemented at some point.

As per improving windows guests support, I'm 👍 on it but I personally don't have a need for that =/ If you or someone else is able to put up a PR I'd me more than happy to review it / bring it in!

@tknerr
Copy link
Author

tknerr commented Jul 13, 2017

Stumbled upon this again. Bummer that the generic cache bucket does not work with windows guests :-/

@fgrehm
Copy link
Owner

fgrehm commented Nov 22, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #193, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants