Vagrant fails when creating a HyperV box from init file

Hi

Vagrant fails when creating a HyperV box from init file:

henri@DESKTOP-VC184G4 ~/Projects/Virtualization/Vagrant/Cows/HyperV/cow1
$ vagrant up --provider hyperv
Traceback (most recent call last):
        29: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in `<main>'
        28: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/bin/vagrant:168:in `new'
        27: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:178:in `ini
tialize'
        26: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:983:in `pro
cess_configured_plugins'
        25: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:956:in `fin
d_configured_plugins'
        24: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:956:in `eac
h'
        23: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:958:in `blo
ck in find_configured_plugins'
        22: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/vagrantfile.rb:237:in `mac
hine_config'
        21: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/vagrantfile.rb:201:in `blo
ck in machine_config'
        20: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:280:in `
find'
        19: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:456:in `
with_collection_lock'
        18: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
        17: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:457:in `
block in with_collection_lock'
        16: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:304:in `
block in find'
        15: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:304:in `
each'
        14: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:311:in `
block (2 levels) in find'
        13: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:311:in `
each'
        12: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:321:in `
block (3 levels) in find'
        11: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/box_collection.rb:321:in `
call'
        10: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:525:in `hoo
k'
         9: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:34:in `ru
n'
         8: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:205:in `blo
ck in action_runner'
         7: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:542:in `hos
t'
         6: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:542:in `new
'
         5: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/host.rb:13:in `initialize'

         4: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/capability_host.rb:36:in `
initialize_capabilities!'
         3: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/capability_host.rb:117:in
`autodetect_capability_host'
         2: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/capability_host.rb:117:in
`inspect'
         1: from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:193:in `ins
pect'
C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:193:in `encode': U+00F8 to I
BM437 in conversion from Windows-1252 to UTF-8 to IBM437 (Encoding::UndefinedConversionError)

What am I doing wrong.

Thanks in advance.

/HenrikVagrantfile.txt (146 Bytes)

Hey there,
It looks like the problem lies in some encoding issues. However, sharing your Vagrantfile might reveal some other clues about what is going wrong here.

Hi @soapy1

I’ve now attached the Vagrant file in the original post (above).

Thank you.

So, I found an issue that looks similar to what you are bumping into here

It seems like the issue also has a workaround; setting VAGRANT_HOME to a path that does not have special characters in it.

Thank you for your suggestion.

The workaround with the VAGRANT_HOME seemed not to work in my case. It seemed that it was the project path, with special char’s embedded, that caused the troubles.

/Henrik