crc
crc copied to clipboard
Openshift local (CRC) running error on windows stating Host File Not Writable
Hi. I'm just trying to run Openshift local but I get the following error message: "Error running post start: host file not writable, try running with elevated privileges" The full output from the Powershell is as follows:
PS F:\Program Files\Red Hat OpenShift Local> crc start -p ..\pull-secret
WARN A new version (2.19.0) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.19.0/crc-windows-installer.zip
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Loading bundle: crc_hyperv_4.12.13_amd64...
INFO Starting CRC VM for openshift 4.12.13...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
Error running post start: host file not writable, try running with elevated privileges
I'm running CRC on my Windows 11 Enterprise. I thought it is not supported on the Enterprise version of the Windows, but as seen from the output, when it checked the Windows version, it didn't complain about it, also the documentation doesn't contain about unsupported version. anyway, I thought that it had something to do with Windows Host file located at /system32/drivers/etc, so I granted full control permission to all users on my PC over the Hosts file, then stopped and started again the CRC but got the same error. Any idea?
can you please follow the issue template? important information is missing.
How can I find the template you mentioned?
the template you mentioned?
Please answer the filed as mentioned here: https://github.com/crc-org/crc/blob/main/.github/ISSUE_TEMPLATE/bug_report.md
This was shown when you filed the issue: https://github.com/crc-org/crc/issues/new?assignees=&labels=kind%2Fbug%2C+status%2Fneed+triage&projects=&template=bug_report.md&title=%5BBUG%5D
Yes, this is related to the permissions on the file. This file needs to be accessed by a service, so this is not a 'user' but a Local System Account
Fresh installation for 2.19.0
tested on
OS Name: Microsoft Windows 11 Enterprise
OS Version: 10.0.22621 N/A Build 22621
Everything works as expected
crc start -p .\pull --log-level debug
DEBU CRC version: 2.19.0+a71226
DEBU OpenShift version: 4.12.13
DEBU Podman version: 4.4.4
DEBU Running 'crc start'
...
PS C:\Users\rhqp> crc status
CRC VM: Running
OpenShift: Running (v4.12.13)
RAM Usage: 6.525GB of 9.397GB
Disk Usage: 16.71GB of 32.74GB (Inside the CRC VM)
Cache Usage: 19.71GB
Cache Directory: C:\Users\rhqp\.crc\cache
General information
- OS: Windows
- Hypervisor: Hyper-V
- Did you run
crc setup
before starting it Yes - Running CRC on: Laptop
CRC version
CRC version: 2.18.0+4ea3a1
OpenShift version: 4.12.13
Podman version: 4.4.1
CRC status
PS F:\Program Files\Red Hat OpenShift Local> crc status --log-level debug
DEBU CRC version: 2.18.0+4ea3a1
DEBU OpenShift version: 4.12.13
DEBU Podman version: 4.4.1
DEBU Running 'crc status'
CRC VM: Running
OpenShift: Unreachable (v4.12.13)
RAM Usage: 448.9MB of 14.68GB
Disk Usage: 14.73GB of 32.74GB (Inside the CRC VM)
Cache Usage: 19.71GB
Cache Directory: C:\Users\Taymaz\.crc\cache
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).Rele
CRC config
PS F:\Program Files\Red Hat OpenShift Local> crc config view
- consent-telemetry : yes
- cpus : 5
- memory : 14336
Host Operating System
$ systeminfo
Host Name: DESKTOP-GGBNUMN
OS Name: Microsoft Windows 11 Enterprise
OS Version: 10.0.22621 N/A Build 22621
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: Taymaz
Registered Organization:
Product ID: xxxxxx-xxxxxx-xxxxx-xxxxx
Original Install Date: 2023-02-12, 11:07:53 AM
System Boot Time: 2023-05-19, 10:59:00 PM
System Manufacturer: ASUSTeK COMPUTER INC.
System Model: MINIPC PN64
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 154 Stepping 3 GenuineIntel ~2382 Mhz
BIOS Version: ASUSTeK COMPUTER INC. 1.05.00, 2022-05-16
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC+03:00) Istanbul
Total Physical Memory: 32,508 MB
Available Physical Memory: 8,001 MB
Virtual Memory: Max Size: 37,372 MB
Virtual Memory: Available: 9,527 MB
Virtual Memory: In Use: 27,845 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\DESKTOP-GGBNUMN
Hotfix(s): 4 Hotfix(s) Installed.
[01]: KB5022497
[02]: KB5012170
[03]: KB5026372
[04]: KB5025351
Network Card(s): 7 NIC(s) Installed.
[01]: Intel(R) Ethernet Controller (3) I225-V
Connection Name: Ethernet
Status: Media disconnected
[02]: Intel(R) Wi-Fi 6E AX211 160MHz
Connection Name: Wi-Fi
DHCP Enabled: Yes
DHCP Server: 192.168.0.1
IP address(es)
[01]: 192.168.0.24
[02]: fe80::3f36:3b4:4c60:56ae
[03]: Bluetooth Device (Personal Area Network)
Connection Name: Bluetooth Network Connection
Status: Media disconnected
[04]: TAP-Surfshark Windows Adapter V9
Connection Name: Ethernet 2
Status: Media disconnected
[05]: PANGP Virtual Ethernet Adapter
Connection Name: Ethernet 3
Status: Media disconnected
[06]: VirtualBox Host-Only Ethernet Adapter
Connection Name: Ethernet 4
DHCP Enabled: No
IP address(es)
[01]: 192.168.56.1
[02]: fe80::837c:8f5b:3e:61ef
[07]: TAP-Windows Adapter V9 for OpenVPN Connect
Connection Name: Local Area Connection
Status: Media disconnected
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
###trying to run CRC:
Please access output of crc start --log-level debug
on the following link:
https://gist.github.com/TCPuniverse/77fb3c83777adbfe2bd3fc96dd6b3296
I see you run several different VPN services, like Surfshark and Global Protect. Perhaps they take ownership of the hosts file (it is a way to force certain endpoints to be resolved with a known value to prevent DNS poisoning for those).
I see you run several different VPN services, like Surfshark and Global Protect. Perhaps they take ownership of the hosts file (it is a way to force certain endpoints to be resolved with a known value to prevent DNS poisoning for those).
I removed all VPN apps and restarted the PC. but I got the same error message. I thought if I could run "crc start" command from the elevated Powershell page, it may solve the issue, but it complained that "crc start" command should be run by non-admin rights. I have also Virtual Box on my PC with a Red Hat VM on it, but it is not running. Don't have any idea if it has something to do with Openshift at all. But, I'm out of any idea. :(
<--output trunked-->
INFO CRC VM is running
DEBU Running SSH command: cat /home/core/.ssh/authorized_keys
DEBU SSH command results: err: <nil>, output: ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAtzVfDG2e01oAAEF/79sDJWg8sxGX/ycXJ1iMSDJEwr5mq1RDV1qA3AxeYVbk4GG4BKHaZh74pKyAHTaier03ukAFKCkZ8wbxxz+4i5wnwfDhxnFlZrjRvFiqyaaCyTP/S/583CUYQutMCdMal+3XAqIseCkPclYAhHasbXtKSeKGDJQ==
DEBU Running SSH command: realpath /dev/disk/by-label/root
DEBU SSH command results: err: <nil>, output: /dev/sda4
DEBU Using root access: Growing /dev/sda4 partition
DEBU Running SSH command: sudo /usr/bin/growpart /dev/sda 4
DEBU SSH command results: err: Process exited with status 1, output: NOCHANGE: partition 4 is size 63961055. it cannot be grown
DEBU No free space after /dev/sda4, nothing to do
DEBU Using root access: make root Podman socket accessible
DEBU Running SSH command: sudo chmod 777 /run/podman/ /run/podman/podman.sock
DEBU SSH command results: err: <nil>, output:
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseId'
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID'
Error running post start: host file not writable, try running with elevated privileges
Finally I tried to delete and cleanup everything, but interestingly got the following; maybe it gives us some clue:
PS F:\Program Files\Red Hat OpenShift Local> crc cleanup
INFO Removing the daemon task
INFO Removing CRC Specific entries from user's known_hosts file
INFO Removing hosts file records added by CRC
INFO Removing pull secret from the keyring
INFO Removing older logs
INFO Removing CRC Machine Instance directory
INFO Removing crc's virtual machine
exit status 1
host file not writable, try running with elevated privileges
PS F:\Program Files\Red Hat OpenShift Local>
can you show which permissions are given the the hosts file? VirtualBox is not running, right?
On Thu, May 25, 2023, 03:41 TCPuniverse @.***> wrote:
I see you run several different VPN services, like Surfshark and Global Protect. Perhaps they take ownership of the hosts file (it is a way to force certain endpoints to be resolved with a known value to prevent DNS poisoning for those).
I removed all VPN apps and restarted the PC. but I got the same error message. I thought if I could run "crc start" command from the elevated Powershell page, it may solve the issue, but it complained that "crc start" command should be run by non-admin rights. I have also Virtual Box on my PC with a Red Hat VM on it, but it is not running. Don't have any idea if it has something to do with Openshift at all. But, I'm out of any idea. :(
— Reply to this email directly, view it on GitHub https://github.com/crc-org/crc/issues/3674#issuecomment-1561829984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAOZTXY7YOJKFELTKZ6BDXHZP45ANCNFSM6AAAAAAYKHPZSE . You are receiving this because you commented.Message ID: @.***>
refer to the above link for the permissions on Windows/system32/drivers/etc/hosts file. Is this error refer to this file permission? maybe it refers to another host file?! Virtual Box is not running and to be sure, I checked the Task Manager for any process with the similar name but found nothing.
I'm stuck and nobody knows how to pull me off?! I hit by so unknown error that nobody has seen ever?!
Thank you for your patience, but yes... this error so far has not been encountered. It sounds really like a local issue, such as something preventing us from writing. Perhaps Windows Defender?
The permissions we need do not need the modifications you made. For all the shown groups, we can suffice with the defaults. Maybe, use a local account for the admin-helper service and see if that resolves something.
https://github.com/crc-org/crc/issues/3674#issuecomment-1557427969
We are unable to reproduce this. I suspect external software, like an application firewall or a security suite, to interfere with the correct operation. Please provide a list of installed software.
We are unable to reproduce this. Please provide a list of installed software to determine if other software is conflicting.
Hello. This is list of installed programs on my Windows 11 PC:
PS C:\Users\Taymaz> Get-Package
Name Version Source ProviderName
---- ------- ------ ------------
Windows Driver Package - Ph... 12/03/2014 1.... Programs
7-Zip 22.01 (x64) 22.01 Programs
Windows Driver Package - Ph... 12/14/2018 1.... Programs
Office 16 Click-to-Run Exte... 16.0.16130.20218 msi
Office 16 Click-to-Run Lice... 16.0.16327.20248 msi
Microsoft Visual C++ 2022 X... 14.32.31326 msi
Microsoft .NET Host FX Reso... 48.23.40665 msi
Microsoft Visual C++ 2010 ... 10.0.40219 msi
Microsoft Visual C++ 2022 X... 14.34.31931 msi
Microsoft Visual C++ 2013 x... 12.0.40664 msi
Bulk Rename Utility 3.4.4.0... 3.4.4.0 Programs
Capture One 23 16.1.3.1223 Programs
Microsoft Visual C++ 2010 ... 10.0.40219 msi
Microsoft Windows Desktop R... 48.23.40699 msi
Microsoft Windows Desktop R... 6.0.5.31215 Programs
ConEmu 221218.x64 11.221.2180 msi
Git 2.40.1 Programs
Microsoft Visual C++ 2013 x... 12.0.40664 msi
Microsoft Update Health Tools 5.70.0.0 msi
Intel(R) Chipset Device Sof... 10.1.19199.8340 msi
Intel(R) Chipset Device Sof... 10.1.19199.8340 Programs
Microsoft Visual C++ 2012 x... 11.0.61030 msi
VMware Remote Console 12.0.3 msi
Kaspersky Internet Security 21.3.10.391 C:\Program Files (x86)\Kasper... msi
Kaspersky Internet Security 21.3.10.391 Programs
Notepad++ (64-bit x64) 8.4.9 Programs
Foxit PDF Editor 12.0.0.12394 F:\Program Files (x86)\Foxit ... msi
Microsoft 365 - en-us 16.0.16327.20248 Programs
AWS Command Line Interface v2 2.11.8.0 msi
Microsoft Visual C++ 2013 x... 12.0.40664 msi
Microsoft .NET Host - 6.0.5... 48.23.40665 msi
Microsoft Visual C++ 2012 x... 11.0.61030 msi
Microsoft OneNote - en-us 16.0.16327.20248 Programs
Microsoft Visual C++ 2012 x... 11.0.61030 msi
Affinity Photo 2.0.3.1688 F:\Program Files\Affinity Photo\ msi
Red Hat OpenShift Local 2.18.0 msi
Microsoft Visual C++ 2013 x... 12.0.40664 msi
VeraCrypt 1.25.9 1.25.9 F:\Program Files\VeraCrypt\ msi
Microsoft Visual C++ 2022 X... 14.34.31931 msi
VLC media player 3.0.18 Programs
Microsoft .NET Runtime - 6.... 48.23.40665 msi
Oracle VM VirtualBox 7.0.8 7.0.8 msi
Microsoft Visual C++ 2012 x... 11.0.61030 msi
MobaXterm 22.0.0.4858 msi
Microsoft Visual C++ 2022 X... 14.32.31326 msi
Surfshark TAP Driver Windows 1.0.1 C:\Program Files (x86)\Surfsh... msi
WinRAR 6.20 (64-bit) 6.20.0 Programs
Microsoft OneDrive 23.114.0530.0001 Programs
Opera Stable 99.0.4788.47 99.0.4788.47 Programs
Telegram Desktop 4.8.1 Programs
Microsoft Visual Studio Cod... 1.77.3 Programs
Epubor Reader 1.0.7.76 Programs
K-Lite Mega Codec Pack 17.4.9 17.4.9 Programs
Adobe Lightroom Classic 12.3 Programs
Microsoft Edge 114.0.1823.41 Programs
Microsoft Edge Update 1.3.175.27 Programs
Microsoft Edge WebView2 Run... 114.0.1823.37 Programs
Longman Dictionary of Conte... Programs
OBS Studio 27.2.4 Programs
Adobe Photoshop 2023 24.4.1.449 Programs
QUICKfind server v1.1 Programs
UXP WebView Support 1.1.0 Programs
Microsoft Visual C++ 2013 R... 12.0.40664.0 Programs
Microsoft Visual C++ 2013 R... 12.0.30501.0 Programs
Microsoft Visual C++ 2012 R... 11.0.61030.0 Programs
Microsoft Visual C++ 2015-2... 14.32.31326.0 Programs
Microsoft Visual C++ 2013 R... 12.0.40664.0 Programs
Microsoft Visual C++ 2012 R... 11.0.61030.0 Programs
Microsoft Visual C++ 2015-2... 14.34.31931.0 Programs
Realtek Audio Driver 6.0.9323.1 Programs
Microsoft Visual C++ 2013 R... 12.0.30501.0 Programs
To be sure there are no any virtualization unit that might conflict with Windows Hyper-V, I also uninstalled VirtualBox and restarted my PC, and tried to start the crc again. but the error remained the same at the end.
PS F:\> cd '.\Program Files\Red Hat OpenShift Local\'
PS F:\Program Files\Red Hat OpenShift Local> crc start -p ..\pull-secret
WARN A new version (2.20.0) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.20.0/crc-windows-installer.zip
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Loading bundle: crc_hyperv_4.12.13_amd64...
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret *****************************************************************************************INFO Creating CRC VM for OpenShift 4.12.13...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.12.13...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Updating authorized keys...
Error running post start: host file not writable, try running with elevated privileges
have you tried running CRC from the C-drive? I believe we describe that CRC has to start from the same drive as windir is located on.
have you tried running CRC from the C-drive? I believe we describe that CRC has to start from the same drive as windir is located on.
Yes. I completely uninstalled Openshift Local from my PC and this time, I fresh installed it on my C drive. After running the initial "crc setup" command which completed successfully, I ran "crc start" and provided the pull secret when it asked, but at the end I got the same exact error. Although It didn't complain about the version of Windows and I double checked the documents on the Internet to see if it had anything to do with the version of my Windows, which is Windows 11 Enterprise edition. I didn't find anything stating this version of windows was not supported. I don't know what to do more, as it is obvious nobody faced with the same error before.
I am facing the same exact issue also, I figure that the main common software between my programs and @TCPuniverse programs is Kaspersky security. I tried uninstalling it, but still facing the same issue, I still think that the problem is kaspersky as after uninstallation has done, there might be some settings not replaced back to normal by kaspersky. By the way my OS is Windows 10 Pro
I'll try a test setup with Kaspersky
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Ali Kamal @.> Sent: Sunday, June 25, 2023 3:40:51 PM To: crc-org/crc @.> Cc: Gerard Braad (admin) @.>; Comment @.> Subject: Re: [crc-org/crc] Openshift local (CRC) running error on windows stating Host File Not Writable (Issue #3674)
I am facing the same exact issue also, I figure that the main common software between my programs and @TCPuniversehttps://github.com/TCPuniverse programs is Kaspersky security. I tried uninstalling it, but still facing the same issue, I still think that the problem is kaspersky as after uninstallation has done, there might be some settings not replaced back to normal by kaspersky. By the way my OS is Windows 10 Pro
— Reply to this email directly, view it on GitHubhttps://github.com/crc-org/crc/issues/3674#issuecomment-1605915526, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7HLE2SA4NFU6JI5ELXYP7DXM7TQHANCNFSM6AAAAAAYKHPZSE. You are receiving this because you commented.Message ID: @.***>
Was able to get this error once, but a stop and start (restart) was enough to clear this.
PS> .\crc.exe start
WARN A new version (2.24.1) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.24.1/crc-windows-installer.zip
INFO Checking minimum RAM requirements
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Loading bundle: crc_microshift_hyperv_4.13.0_amd64...
INFO Starting CRC VM for microshift 4.13.0...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
Error running post start: host file not writable, try running with elevated privileges
PS> .\crc.exe stop
INFO Stopping the instance, this may take a few minutes...
Stopped the instance
PS> .\crc.exe start
WARN A new version (2.24.1) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.24.1/crc-windows-installer.zip
INFO Checking minimum RAM requirements
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Loading bundle: crc_microshift_hyperv_4.13.0_amd64...
INFO Starting CRC VM for microshift 4.13.0...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Starting Microshift service... [takes around 1min]
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding microshift context to kubeconfig...
Started the MicroShift cluster.
Use the 'oc' command line interface:
PS> & crc oc-env | Invoke-Expression
PS> oc COMMAND
In my case Kaspersky causes troubles. After temporarily disabling Kaspersky crc starts without problems.