OpenShift - crc start command (CodeReady Containers)

The crc start command is used to start a CodeReady Container. Before invoking the crc start command, you should have already invoked the crc setup command. I always suggest using the --log-level debug option.

crc start --log-level debug

 

The -p or --pull-secret-file option followed by the name of your secrets file, which is pull-secret.txt by default, can be used to not be prompted for the pull secret during startup.

crc start --pull-secret-file pull-secret.txt

 

If you did not use the -p or --pull-secret-file option, you will be prompted for your pull secret. Copy the contents of pull-secret.txt, paste the contents in the terminal, and press enter.

? Image pull secret [? for help]

 

If the start is successful, the following should be displayed.

Started the OpenShift cluster

 

On Windows, this will create a virtual machine named "crc" in Hyper-V.

 

Under the hood, PowerShell is used to create the crc virtual machine. If you are --log-level debug using the option, the crc.log will show the PowerShell command used to create the crc virtual machine in Hyper-V.

(crc) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\New-VM crc -Path 'C:\Users\john.doe\.crc\machines\crc' -SwitchName 'Default Switch' -MemoryStartupBytes 9216MB

 

If the start fails, something like this will be displayed.

ERRO Error creating machine: Error creating the VM: Error creating machine: Error in driver during machine creation: exit status 1

 

And the crc.log could have something like this.

(crc) DBG | [stderr =====>] : Hyper-V\New-VM : Creating the virtual machine failed.

 

You can try using the -f or --force option if the startup fails.

crc start --force

 

If the start fails even with the -f or --force option, you'll typically want to perform the following steps.

  • Invoke the crc status command to determine if the crc machine exists
  • If the crc machine exists, optionally invoke the crc delete command and then verify that the "crc" virtual machine no longer exists in Hyper-V (on Windows)
  • Optionally, Invoke the crc cleanup command
  • Review the crc.log file
  • Optionally, delete the hidden .crc directory (refer to crc.log) - You probably only want to do this if you are OK will totally blowing away the current install of CodeReady Containers
  • Restart your PC or laptop
  • Invoke the crc setup command
  • Invoke the crc start command

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 0689b in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |