tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

Fails to configure Win7 #154

Closed berndv closed 5 years ago

berndv commented 7 years ago

Plugin fails to configure Win7 boxes. Looks like it fails to detect the OS properly, because error message is showing some linux commands (see also #110):

==> default: Configuring proxy environment variables...
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mv -f /tmp/vagrant-proxyconf /proxy.conf

Vagrant 1.8.5 vagrant-proxyconf 1.5.2 VirtualBox 5.1.2

Full output:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'win7'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: win7_default_1475069692205_26765
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3389 (guest) => 33389 (host) (adapter 1)
    default: 5985 (guest) => 55985 (host) (adapter 1)
    default: 5986 (guest) => 55986 (host) (adapter 1)
    default: 22 (guest) => 2222 (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:55985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring proxy environment variables...
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mv -f /tmp/vagrant-proxyconf /proxy.conf

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">Move-Item : Der Parameter kann nicht verarbeitet werden, da der Parametername "_x000D__x000A_</S><S S="Error">f" nicht eindeutig ist. Mögliche Übereinstimmungen:  -Force -Filter._x000D__x000A_</S><S S="Error">Bei Zeile:1 Zeichen:42_x000D__x000A_</S><S S="Error">+ $ProgressPreference='SilentlyContinue';mv &lt;&lt;&lt;&lt;  -f /tmp/vagra

c:\tmp\win7>
marcowork commented 7 years ago

works fine here; can you show us your vagrantfile?

generalov commented 7 years ago

A same error. I've added print statements into Vagrantfile

print config.vm.guest
print config.vm.guest.eql?(:windows)

and output was: #<Object:0x40f5690>false

Then I've added

config.vm.guest = :windows

and vagrant-proxyconf is worked.