Hi, got the same error here and I was able to fix it by changing some
vagrant files :
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.1\plugins\providers\hyperv\driver.rb
line 91 ps_options << "\"#{value}\"" instead of ps_options << "'#{value}'"
i.e. command line parameter are within "" instead of '' in my system.
then I encountered another issue in file
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.1\plugins\synced_folders\smb\scripts\set_share.ps1
line 42 something like
if ($result -Match "$share_name was .... .") {
exit 0
}
exit 1
That's nice, but my system uses different language, so ends as error
because ok message is different. While script is working well and im lazy,
I just added exit 0 right after
if ($result -Match "$share_name was .... .") {
exit 0
}
finally I got my first hyperv machine ready!
Hope it helps
MM.
Dne pondělí, 17. března 2014 20:12:23 UTC+1 Ryan Thornhill napsal(a):
> Trying to spin up a box on hyper-v using the newest release (1.5.1)
> getting an error. Is there something obvious I'm doing wrong or is it just
> a bug?
>
> This is on Server 2012R2 with a 2008R2 base box.
>
> D:\hypervProject>vagrant up --provider hyperv
> Bringing machine 'default' up with 'hyperv' provider...
> ==> default: Importing a Hyper-V instance
>
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/hyperv/a
> ction/import.rb:45:in `call': undefined method `empty?' for nil:NilClass
> (NoMeth
> odError)
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:95:in `block in finalize_action'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/builder.rb:116:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/runner.rb:69:in `block in run'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/u
> til/busy.rb:19:in `busy'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/runner.rb:69:in `run'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/builtin/call.rb:51:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/builtin/config_validate.rb:25:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/builtin/handle_box.rb:56:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/warden.rb:34:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/builder.rb:116:in `call'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/runner.rb:69:in `block in run'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/u
> til/busy.rb:19:in `busy'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/a
> ction/runner.rb:69:in `run'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/m
> achine.rb:157:in `action'
> from
> C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/b
> atch_action.rb:72:in `block (2 levels) in run'
> from
> C:/Users/Administrator/.vagrant.d/gems/gems/logging-1.8.2/lib/loggi
> ng/diagnostic_context.rb:323:in `call'
> from
> C:/Users/Administrator/.vagrant.d/gems/gems/logging-1.8.2/lib/loggi
> ng/diagnostic_context.rb:323:in `block in create_with_logging_context'
>
>
> Any advice is appreciated!
>
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.