Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failure to setup CRC on Windows 10 #752

Closed
DhruvM1994 opened this issue Oct 22, 2019 · 7 comments
Closed

[BUG] Failure to setup CRC on Windows 10 #752

DhruvM1994 opened this issue Oct 22, 2019 · 7 comments
Labels
kind/bug Something isn't working status/need more information Issue needs more information before it will be looked at

Comments

@DhruvM1994
Copy link

General information

  • OS: Windows 10 (1809)
  • Hypervisor: Hyper-V
  • Did you run crc setup before starting it (Yes)?

CRC version

version: 1.0.0-rc.0+34371d3
OpenShift version: 4.2.0-0.nightly-2019-09-26-192831

CRC config

skip-check-windows-version            : true

Steps to reproduce

  1. Download above version of crc and run "crc setup"

Expected

Setup should succeed

Actual

When executing crc setup the following errors occur:
-Failed to get Windows release id
-Please manually update your Windows 10 installation
-Please manually update your Windows 10 installation

When skipping the windows version check the following errors occur:
-Hyper-V not installed

However, the os is updated and Hyper-V is installed.

@DhruvM1994 DhruvM1994 added the kind/bug Something isn't working label Oct 22, 2019
@anjannath
Copy link
Member

@DhruvM1994 I couldn't reproduce the issue, tried on a Windows 10 (1803).

The setup command tries to fix the error, in your case when it found out that Hyper-V is not enabled, crc setup will try to enable it.

Please provide the following o/p:

Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId

Also put the full o/p from setup command? run with debug logs enabled crc setup --log-level debug

@anjannath anjannath added the status/need more information Issue needs more information before it will be looked at label Oct 22, 2019
@DhruvM1994
Copy link
Author

DhruvM1994 commented Oct 22, 2019

It seems that crc cannot find the location of the Hyper-V installation. I am also wondering why it cannot find the Windows release id.

Output of Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId is:

ReleaseId    : 1809
PSPath       : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT
PSChildName  : CurrentVersion
PSDrive      : HKLM
PSProvider   : Microsoft.PowerShell.Core\Registry

Output of crc setup --log-level debug is:

INFO Checking if running as normal user
INFO Caching oc binary
DEBU oc binary already cached
INFO Unpacking bundle from the CRC binary
INFO Check Windows 10 release
ERRO Error occurred: Failed to get Windows release id
DEBU Failed to get Windows release id
ERRO Error occurred: Please manually update your Windows 10 installation
FATA Please manually update your Windows 10 installation

@gbraad
Copy link
Contributor

gbraad commented Oct 22, 2019

This might happen when the path of the PowerShell command is incorrect (not on path?). As this is the first instance of using PowerShell

@DhruvM1994
Copy link
Author

The path to poweshell is there and it seems to be correct. But when I try executing powershellin the command-line it says Access denied

@DhruvM1994
Copy link
Author

You were right with the path to powershell.
I had additionally an invalid path (C:\Windows\System32) to powershell.

Thank you very much.

@anjannath
Copy link
Member

@DhruvM1994 So you are able to use crc now? Feel free to close this issue if that is the case.

@gbraad
Copy link
Contributor

gbraad commented Oct 22, 2019

I believe we can improve this.

We check for the location of PowerShell, but fail with an error... perhaps we can expose this.
But we can also, on first error to locate in path, use the default location before failing completely.

anjannath added a commit to anjannath/crc that referenced this issue Oct 23, 2019
… in PATH

if exec.LookPath can't find the location of powershell.exe
we fall back to using C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
anjannath added a commit to anjannath/crc that referenced this issue Oct 23, 2019
… in PATH

if exec.LookPath can't find the location of powershell.exe
we fall back to using C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
anjannath added a commit to anjannath/crc that referenced this issue Nov 1, 2019
… in PATH

if exec.LookPath can't find the location of powershell.exe
we fall back to using C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
praveenkumar pushed a commit that referenced this issue Nov 1, 2019
if exec.LookPath can't find the location of powershell.exe
we fall back to using C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/need more information Issue needs more information before it will be looked at
Projects
None yet
Development

No branches or pull requests

3 participants