crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.23k stars 233 forks source link

[BUG]crc setup error Unable to perform Hyper-V administrative commands. #1178

Closed davidlongcode closed 3 years ago

davidlongcode commented 4 years ago

General information

CRC version


# Put `crc version` output here
crc version: 1.9.0+a68b5e0
OpenShift version: 4.3.10 (embedded in binary)

## Host Operating System

# Put the output of `systeminfo` in case of Windows
Host Name:                 DESKTOP-09MLNU5
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19041 N/A Build 19041
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          IBMUSER
Registered Organization:   IBM
Product ID:                00330-80000-00000-AA156
Original Install Date:     17/12/2019, 18:56:17
System Boot Time:          18/04/2020, 01:40:34
System Manufacturer:       LENOVO
System Model:              20BTS1NH06
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 61 Stepping 4 GenuineIntel ~2295 Mhz
BIOS Version:              LENOVO N14ET46W (1.24 ), 01/03/2018
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-ie;English (Ireland)
Time Zone:                 (UTC+00:00) Dublin, Edinburgh, Lisbon, London
Total Physical Memory:     8,071 MB
Available Physical Memory: 3,928 MB
Virtual Memory: Max Size:  13,322 MB
Virtual Memory: Available: 7,512 MB
Virtual Memory: In Use:    5,810 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\DESKTOP-09M
Hotfix(s):                 4 Hotfix(s) Installed.
                           [01]: KB4534170
                           [02]: KB4537759
                           [03]: KB4545706
                           [04]: KB4550936
Network Card(s):           7 NIC(s) Installed.
                           [01]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
                                 Connection Name: Ethernet 2
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 9.145.154.100
                                 [02]: fe80::1c4e:1843:c910:xxx
                           [02]: Intel(R) Ethernet Connection (3) I218-LM
                                 Connection Name: Ethernet
                                 Status:          Media disconnected
                           [03]: Intel(R) Dual Band Wireless-AC 7265
                                 Connection Name: Wi-Fi
                                 DHCP Enabled:    Yes
                                 DHCP Server:     N/A
                                 IP address(es)
                           [04]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (Default Switch)
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 172.17.32.1
                                 [02]: fe80::a8c3:abcf:2e9f:xxxx
                           [05]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth Network Connection
                                 Status:          Media disconnected
                           [06]: Microsoft Network Adapter Multiplexor Driver
                                 Connection Name: Network Bridge
                                 DHCP Enabled:    Yes
                                 DHCP Server:     N/A
                                 IP address(es)
                           [07]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (crc)
                                 DHCP Enabled:    Yes
                                 DHCP Server:     172.20.10.1
                                 IP address(es)
                                 [01]: 172.20.10.2
                                 [02]: fe80::3838:8a63:9087:xxxx
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

### Steps to reproduce

  1. checked install user is member of HyperV admin group (yes)
  2. added install path to env variable (yes)
  3. open powershell command prompt. change to install directory
  4. run crc setup --level-log debug

### Expected
complete CRC setup

### Actual

### Logs
crc setup --log-level debug
INFO Checking if oc binary is cached
DEBU oc binary already cached
INFO Checking if podman remote binary is cached
DEBU podman remote currently not supported on this platform
INFO Checking if CRC bundle is cached in '$HOME/.crc'
INFO Checking if running as normal user
INFO Checking Windows 10 release
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
DEBU User is not a member of the Hyper-V administrators group
INFO Adding user to the Hyper-V Administrators group
INFO Will run as admin: add user to hyperv admins group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
DEBU Virtual Switch not found
ERRO Unable to perform Hyper-V administrative commands. Please make sure to re-login or reboot your system
FATA Unable to perform Hyper-V administrative commands. Please make sure to re-login or reboot your system
You can start crc with `crc start --log-level debug` to collect logs.
Please consider posting this on http://gist.github.com/ and post the link in the issue.
gbraad commented 4 years ago

Domain: WORKGROUP Logon Server: \DESKTOP-09M

You are not on a domain-linked computer? So it is unlikely to be an issue with the policies for the account. Did you follow the suggestion:

Please make sure to re-login or reboot your system

as that is not mentioned in your "Steps to reproduce".

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

anjannath commented 4 years ago

@davidlongcode did setup work for you after the reboot as mentioned in the setup o/p?

fcolomas commented 3 years ago

No, I tried a lot same issue, maybe it's because it's Windows 10 Home?

praveenkumar commented 3 years ago

@fcolomas we don't support windows 10 Home at this moment but have a look to https://github.com/code-ready/crc/issues/1193 one. Closing this issue since there is no response from the OP.

catshout commented 3 years ago

I did experience the same issue. I'm running Windows 10 64 Bit Professional. My log shows

DEBU CodeReady Containers version: 1.16.0+bf72d3a
DEBU OpenShift version: 4.5.9 (embedded in binary)
INFO Checking if oc binary is cached
DEBU Running 'C:\Users\gkallas\.crc\bin\oc\oc.exe version --client'
DEBU oc binary already cached
INFO Checking if podman remote binary is cached
DEBU Currently podman remote is not supported
INFO Checking if goodhosts binary is cached
DEBU goodhost binary already cached
INFO Checking if CRC bundle is cached in '$HOME/.crc'
INFO Checking minimum RAM requirements
DEBU Total memory of system is 17027641344 bytes
INFO Checking if running as normal user
INFO Checking Windows 10 release
INFO Checking Windows edition
DEBU Running on Windows Professional edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
DEBU User is not a member of the Hyper-V administrators group
INFO Adding user to the Hyper-V Administrators group
INFO Will run as admin: add user to hyperv admins group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
DEBU Virtual Switch not found
Unable to perform Hyper-V administrative commands. Please reboot your system and run 'crc setup' to complete the setup process

Could this ticket please being re-opened?

catshout commented 3 years ago

Finally I did add my domain account to the local group "Hyper-V administrators" manually and it worked.

EKoetsjarjan commented 3 years ago

Hi none of above helped me. There was somethiing wrong with my default virtual switch settings.

When I checked the virtual switch manager from hyper-v administration program , the settings where grayed out

till I have uninstalled and installed again, the Hyper-V components from the configuration screen -> Windows Software parts enable/disable menu restarted. then it all worked. and I could run crc setup and crc start

now the virtual switch manager was also showing the correct options...

leyvReyn commented 3 years ago

Finally I did add my domain account to the local group "Hyper-V administrators" manually and it worked.

For me (Win 10 Pro) helped:

  1. Click Start > Control Panel > Administration Tools > Computer Management. The Computer Management window opens.

  2. Click System Tools > Local Users and Groups > Groups. The list of groups opens.

  3. Double-click the Hyper-V Administrators group. The Hyper-V Administrators Properties window opens.

  4. Click Add. The Select Users or Groups window opens.

  5. In the Enter the object names to select field, enter the user account name to whom you want to assign permissions (current user name shown on login screen on windows start) , and then click OK.

  6. Click Apply, and then click OK.

  7. Reboot

tbulubas commented 3 years ago

This worked for me, with this https://github.com/code-ready/crc/issues/1401 one on top.