book
Article ID: CTX691401
calendar_today
Updated On:
Description
- WSL will not work properly on Azure and AWS VM created from master image where WSL is setup but below is workaround to enable it for persistent VMs
- When attempting to create a Linux subsystem on a persistent machine generated via MCS, WSL fails with a specific error message - "Error: 0xe000020b". On the master image, the installation of WSL2 and the conversion from WSL1 to WSL2 proceed without any problems. However, when provisioning a machine from that master image, we encounter difficulties installing WSL2 or converting it from WSL1 to WSL2

- Microsoft Azure [Windows 10 and higher] on DaaS or CVAD Cloud 120
- AWS [Windows 10 and higher] on DaaS or CVAD Cloud 120
The impact is WSL can no longer be reinstalled or updated from WSL1 to WSL2. The possible reason for these failures is the "Ghost Adapters" or phantom Plug and Play (PnP) devices, that refer to hardware components that appear in your system but are not physically connected. These "ghost" devices can cause confusion and clutter in your system settings. If you see ghost adapters when running WSL in a Virtual Machine (VM), follow these manual steps to find and delete these Phantom PnP devices. This is a WSL limitation.
Before moving on to the resolution of the issue, we need to take care of a few prerequisites that are required before starting the workaround steps.
- Make sure that the MCS provisioned VM has HyperV and Virtualization both enabled. You can check this either by:
- Searching for "Turn Windows Features On or Off" in the Start Menu and selecting these options [Hyper-V and Virtual Machine Platform] if they are not selected.
- Or you can also enable virtualization by powershell by using the following commands:
- Try uninstalling and installing WSL2 back on the system to check if that works:
- wsl --unregister <distribution_name>
Ex: wsl --unregister Ubuntu
- wsl --install <distribution_name>
Ex: wsl --install Ubuntu
- Confirm if the error still persists: If the above steps don't work, you should be getting the same error code mentioned above while installing WSL again. Or you can also try updating the WSL version for double checking if the installation is successful by using the following command:
- wsl --set-version <distribution_name> 2
Ex: wsl --set-version Ubuntu 2
- For workaround of the issue, the initial step is to unregister the Linux version that was giving out the error. This might resolve the issue sometimes. ex: wsl --unregister Ubuntu
- If that does not seem to work or if we're getting the same error - Error: 0xe000020b, Go to Device Manager on your windows machine-> On the menu pane, click on View and select "Show hidden devices" -> Expand the Network Adapters section -> Uninstall all the hidden Network Adapters from the list (They'll look something like the ones marked in below images).
Phantom Adapters in Azure

Phantom adapters in AWS

- On the menu pane again, click on Action and select "Scan for hardware changes"
- In case, if you see any network adapters with warning signs, uninstall/reinstall them. If the warning sign does not go, just uninstall and WSL should reinstall it again properly
- Now, install WSL with required distribution and you should be able to run/update the version. Ex: wsl --install -d Ubuntu
- By default WSL2 will be installed for the distribution that you want to install, but in case you have to update WSL1 to WSL2, you can use the following powershell command to do so: wsl --set-version Ubuntu 2
-
Note: So far we have found these issues pertinent only to Azure and AWS platforms. In any case, if such issue is encountered in any other hypervisor like VMWare, please try the same solution approach at first. Different hypervisors or VMs hosted on different platforms may have different types of Ghost adapters, identifying and uninstalling them is important step for this resolution.
Environment
Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.