Powershell executable not available on the path

c:\Users\ARUN\M001\m103-vagrant-env>vagrant up --provision
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
Failed to locate the powershell executable on the available PATH. Please
ensure powershell is installed and available on the local PATH, then
run the command again.

My env variables are set for the powershell

I am facing same error !

I have downloaded the Vagrant 1.9.6 version as i am on Windows 7 Service pack 1 and set my environment variables as below in PATH

C:\HashiCorp\Vagrant\bin

Hi Hemanthpradeep,

Please look at the post here: Vagrant Issues on Windows

Let me know if you are still facing trouble.

Kanika

Hi @Kanika

I tried the above solution to upgrade my powershell from 2.0 to 3.0, but when downloading and updating i see error

windows update error 0xc8000247

Hi @Kanika @Tess_Sluijter

I wonder should we follow the process in the same order mentioned ?

  1. Install VirtualBox
  2. Install MinGW
  3. Install rsync and ssh
  4. Install Vagrant

I did it the other way , is that a problem ?

If everything is working fine. I don’t see any problem there.

But yes, I would recommend following the steps in the same way.

Kanika

1 Like

The order of 1-3 doesn’t really matter, but installing Vagrant last is a good idea.

Hi,
I have tried installing the above pattern , but still no luck
Struct with the error

C:\Users\HEMANTH\M103>vagrant up
Must redirect to new repository for old Vagrant versions
The executable ‘powershell’ Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.

could you please help me ! :frowning: @Tess_Sluijter @Kanika

Well,
I tried in a different way now !
I have installed the Latest Vagrant version from the website (but not the 1.9.6 as mentioned in the description) and i see a different error

Failed to locate the powershell executable on the available PATH. Please
ensure powershell is installed and available on the local PATH, then
run the command again.

So i added the Powershell path and see the issue as below

The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.

Installed version: 2

Minimum required version: 3

C:\Users\HEMANTH\M103>

Now, It all came down to my earlier problem , when i tried to upgrade my powershell to 3 , i face problem as

I tried the above solution to upgrade my powershell from 2.0 to 3.0, but when downloading and updating i see error

windows update error 0xc8000247

I knew this is not a forum to address the issue my system, but i had no choice as i googled for solution, but thats too difficult for me, If you could help me any way , provide some quick ideas , i would really appreciate it or else i had no choice but to drop this session for this time :frowning:

cheers
H

1 Like

It appears that your computer does not have PowerShell installed, which is required.

PowerShell is a Microsoft shell that comes with every release of Windows 8, 10, 2012, and 2016. But apparently it’s not guaranteed with Windows 7.

You will need to add PowerShell to your computer. I can’t check where to download it right now, but a web search should help you find it.

Just as a quick test: does PowerShell start when you enter “ PowerShell.exe” into the Windows “Run” pop up?

If you want to use Vagrant etc, then you will have to upgrade your OS, or you will need to use a different computer. Your current Win7 simply appears to be too old. No way around that.

You could use another modern OS, or another solution on Win7, but I’m certain those are more difficult than upgrading Windows.

apparently my latest post was not published :frowning:

I was able to update the OS and see below error now while trying to run

Vagrant up

Blockquote
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“startvm”, “33c22e24-234e-4ebe-8c31-7bf502c6ef52”, “–type”, “headless”]
Stderr: VBoxManage.exe: error: The virtual machine ‘mongod-m103’ has terminated
unexpectedly during startup with exit code 1 (0x1). More details may be availab
le in ‘C:\Users\HEMANTH\VirtualBox VMs\mongod-m103\Logs\VBoxHardening.log’
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
interface IMachine

@Tess_Sluijter @Kanika

cheers
H

1 Like

Hi Hemanthpradeep,

Please take a look at [Solution] "startvm" VBoxManage.exe error

If still you are unable to solve the issue, let me know.

Kanika

Thanks @Kanika
Is it same for Windows 7 too ?

Here is one solution which I found working for other people having same issues:

Here is what I did. I have a Windows7 SP1 machine.

  1. I downloaded the latest versions of vagrant and virtual box.
  2. I updated poweshell from 2 to 3 using the instructions here: https://docs.microsoft.com/en-us/skypeforbusiness/set-up-your-computer-for-windows-powershell/download-and-install-windows-powershell-3-0
  3. I enabled the virtualization in the BIOS (on my machine is was under device configuration)

Here is the full post: Vagrant Issues on Windows

Kanika

And we could of course also take a look at that logfile Vagrant pointed towards :slight_smile: what’s that logfile say?

Here is what log file says at the end atleast !!!

Blockquote

\HarddiskVolume2\Program Files\Oracle\VirtualBox\VBoxHeadless.exe’ has no imports
16ec.1104: ‘\Device\HarddiskVolume2\Windows\System32\apisetschema.dll’ has no imports
16ec.1104: ‘\Device\HarddiskVolume2\Windows\System32\ntdll.dll’ has no imports
16ec.1104: supR3HardNtChildPurify: Done after 296 ms and 0 fixes (loop #0).
964.1550: Log file opened: 6.0.0r127566 g_hStartupLog=0000000000000004 g_uNtVerCombined=0x611db100
964.1550: supR3HardenedVmProcessInit: uNtDllAddr=00000000778c0000 g_uNtVerCombined=0x611db100
16ec.1104: supR3HardNtEnableThreadCreation:
964.1550: ntdll.dll: timestamp 0x4ce7c8f9 (rc=VINF_SUCCESS)
964.1550: New simple heap: #1 00000000002e0000 LB 0x400000 (for 1740800 allocation)
964.1550: supR3HardenedWinInitAppBin(0x0): ‘\Device\HarddiskVolume2\Program Files\Oracle\VirtualBox’
964.1550: System32: \Device\HarddiskVolume2\Windows\System32
964.1550: WinSxS: \Device\HarddiskVolume2\Windows\winsxs
964.1550: KnownDllPath: C:\Windows\system32
964.1550: supR3HardenedVmProcessInit: Opening vboxdrv stub…
964.1550: Error opening VBoxDrvStub: STATUS_OBJECT_NAME_NOT_FOUND
964.1550: supR3HardenedWinReadErrorInfoDevice: NtCreateFile -> 0xc0000034
964.1550: Error -101 in supR3HardenedWinReSpawn! (enmWhat=3)
964.1550: NtCreateFile(\Device\VBoxDrvStub) failed: 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND (0 retries)

Driver is probably stuck stopping/starting. Try ‘sc.exe query vboxdrv’ to get more information about its state. Rebooting may actually help.
16ec.1104: supR3HardenedWinCheckChild: enmRequest=2 rc=-101 enmWhat=3 supR3HardenedWinReSpawn: NtCreateFile(\Device\VBoxDrvStub) failed: 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND (0 retries)

Driver is probably stuck stopping/starting. Try ‘sc.exe query vboxdrv’ to get more information about its state. Rebooting may actually help.
16ec.1104: Error -101 in supR3HardenedWinReSpawn! (enmWhat=3)
16ec.1104: NtCreateFile(\Device\VBoxDrvStub) failed: 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND (0 retries)

Driver is probably stuck stopping/starting. Try ‘sc.exe query vboxdrv’ to get more information about its state. Rebooting may actually help.

how can i attach the completer log file here ?

I have enabled the virtulaization in BIOS set up as mentioned by @Kanika in other post !

1 Like

Thank you for your help !

I had no choice but to unregister for the course