CodeReady Containers and Windows featured image

Red Hat CodeReady Containers allows you to spin up a small Red Hat OpenShift cluster on your local PC, without the need for a server, a cloud, or a team of operations people. For developers who want to get started immediately with cloud-native development, containers, and Kubernetes (as well as OpenShift), it's a simple and slick tool. It runs on macOS, Linux, and all versions of Windows 10.

Except for Windows 10 Enterprise.

Which I painfully learned.

Because I lazily didn't pay attention to the documentation.

OK, so I'm the only developer who glosses over documentation. Fortunately for you, I struggled and managed to get CRC running on my Windows 10 Enterprise notebook computer, and this article explains what is involved to get it working. So, in a sense, you're welcome that I'm lazy.

It's right there in front of you

Turns out, the CRC installation web page explicitly tells us which versions of Windows 10 are supported, and Windows 10 Enterprise (and Windows Server) is not explicitly mentioned as one of them (see Figure 1).

screenshot of the supported Windows versions
Figure 1: Do you see Windows 10 Enterprise or Server? I can't either.

My thinking was that, if it supports Home and Pro, then obviously a much more "enterprisey" version like Windows 10 Enterprise would be supported. I mean, it must have all the bits of the lesser versions, plus a whole lot more, right?

Turns out, that's the underlying issue.

Some history

Windows 98 introduced Internet Connection Sharing (ICS) to Windows, making it easier for network users—for example—to use a shared dial-up modem (remember those?) That technology was replaced, and the replacement is what runs as a service in Windows 10—except for the enterprise version.

The enterprise version also uses a completely-rewritten network connection stack, one that was built for servers (as opposed to workstations), but with one exception: Within the Hyper-V manager in Windows 10 Enterprise, as of this writing, the Default Switch still uses the old ICS technology.

CodeReady Container behavior

CRC looks for and uses the Default Switch on your PC's Windows 10 machine, which means it works fine with Windows 10 Home and Professional. But when CRC attempts to use the Default Switch in Windows 10 Enterprise, it's using older (ICS) technology that isn't compatible.

So what do you do?

Use the source, Luke

Or Sarah, or whatever your name is. Here's the point: Because CRC is open source, you can examine the source code and see how the program uses the switch for DNS lookup. Lo and behold, right there in the Go source code, we can see that an alternative is supported as shown in Figure 2.

screenshot of the Go code showing an alternate method

Figure 2: The solution was right there.">

That's right. If we create a switch named crc, it will be used instead of Default Switch.

Hyper-excited about this

From here it's simple. We open the Hyper-V manager and create a new External switch named crc, as shown in Figure 3.

screenshot of the virutal switch manager dialog
Figure 3: Creating the External switch.

Fire it up

The only remaining step is to start CRC, as shown in Figure 4:

$ crc start -p ~/Downloads/pull-secret.txt
animation of the start process
Figure 4: Look at that, it works!

Once you have CRC up and running, get things really working by visiting the Red Hat Marketplace and grab some awesome software to run. Most of them offer free trials; here's your chance to install, say, an eventing engine in OpenShift, and see how easy it is to use.

So there you have it. One small change and your Windows 10 Enterprise PC can run CodeReady Containers. While this setup is not officially supported, I've had no issues with it. Let me know if it's the same for you in the comments.

From here, you might want to check out:

Last updated: April 7, 2022