Windows 10 Could not be detected by Vagrant

258 views
Skip to first unread message

Michael Legleux

unread,
Aug 6, 2015, 7:51:38 PM8/6/15
to Vagrant
But it obviously can, as in the debug output I see windows 10 all over the place.

This was with Virtualbox 4 and 5.

This seems to be a relevant part of the debug output:

DEBUG guest: Trying: windows
DEBUG winrmshell: powershell executing:
            $p = "$Env:SystemRoot"
            if ((Test-Path $p) -and (get-item $p).PSIsContainer) {
              exit 0
            }
            exit 1

if ($?) { exit 0 } else { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }
DEBUG winrmshell: Output: {:data=>[{:stderr=>"#< CLIXML\r\n"}, {:stderr=>"<Objs Version=\"1.1.0.1\" xmlns=\"http://schemas.microsoft.com/powershell/2004/04\"><Obj S=\"progress\" RefId=\"0\"><TN RefId=\"0\"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N=\"SourceId\">1</I64><PR N=\"Record\"><AV>Preparing m"}, {:stderr=>"odules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>"}], :exitcode=>0}
ERROR warden: Error occurred: The guest operating system of the machine could not be detected!
Vagrant requires this knowledge to perform specific tasks such
as mounting shared folders and configuring networks. Please add
the ability to detect this guest operating system to Vagrant
by creating a plugin or reporting a bug.
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::HandleForwardedPortCollisions:0x39dfb78>
 INFO warden: Recovery complete.

How can no one else be experiencing this?

dragon788

unread,
Aug 7, 2015, 12:02:55 PM8/7/15
to Vagrant
I would try explicitly setting the guest type to :windows so that Vagrant doesn't have to guess and see if you are able to get any further.

Michael Legleux

unread,
Aug 13, 2015, 5:44:00 PM8/13/15
to Vagrant
While this does somewhat put a band-aid on the "cannot detect operating system error",
the networking configuration doesn't complete.

==> win10: Configuring and enabling network interfaces...
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

netsh interface ip set address "Ethernet 2" dhcp
if ($?) { exit 0 } else { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } }

Stdout from the command:

Stderr from the command:

Joaquin Menchaca

unread,
Oct 25, 2015, 4:39:44 AM10/25/15
to Vagrant
I encountered this error, and found https://github.com/mitchellh/vagrant/issues/6060.

There's apparently an issue with PowerShell V5, which will be fixed in a future version.
Reply all
Reply to author
Forward
0 new messages