Ошибка с кодом 0x80370102 сопровождается сообщением «WslRegisterDistribution failed with error». Имеет привычку появляться при попытке установить дистрибутив Linux для доступа через подсистему Windows к Linux 2 (WSL2). Таким образом процедура развертывания саб-системы обрывается и сам смысл свежевыпущенной функции Windows испаряется. Инсталляция Linux Distro обрывается сообщением:
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machines could not be started because a required feature is not installed.
Причины ошибки 0x80370102
Речь идет о совсем новой ошибке, ведь она начала появляться только с конца лета 2021 года с выпуском WSL2. Она начала появляться не только при попытке установить подсистему Linux, но и Debian. В силу новизны, у нее пока нет подробного технического разбора со стороны разработчиков, и мы полагаемся на пользователей и их отчеты. Они указывают на наличие следующих нескольких проблем:
- Используется сборка Windows Insider Preview. Многие пользователи инсайдерской версии Windows испытывают данную проблему и это нормально, ведь речь идет о незавершенной системе. Нужно ждать обновлений.
- Проблемы перехода с WSL 1 на WSL 2. Результат опять же недоработанного программного обеспечения.
- Выключена или отсутствует аппаратная виртуализация. Ее должен поддерживать процессор. Если такой функции в ЦП не предусмотрено, воспользоваться подсистемой Linux не получится. Может быть, что опция просто отключена и ее нужно включить.
- Выключен Hyper-V. Это важный компонент виртуальной среды, который участвует в запуске нескольких операционных систем на одной физической машине. Его нужно обязательно активировать.
Что делать при ошибке 0x80370102?
Все исправления вытекают из причин ошибки. Пока что мы можем только включить аппаратную виртуализацию и Hyper-V. Если ваша версия Windows (от 2004, май 2020 года) и оборудование позволяет использовать подсистему WSL2, она должна заработать после ручного включения обязательных компонентов.
1. Включить аппаратную виртуализацию в BIOS
Если попытаться запустить Ubuntu или другую разновидность Linux в VirtualBox без активации аппаратной виртуализации, Windows отобразит сразу ряд ошибок. Система начнет грешить на распределение регистров WSL, звук и другие сбои. Данная функция обязательно должна быть включена, иначе запустить виртуальную систему не получится. К сожалению, активируется опция в BIOS, поэтому придется сделать несколько лишних телодвижений.
Как исправить ошибку 0x80370102:
- Нажимаем на виртуальную кнопку в Пуске – «Перезагрузить».
- В момент включения компьютера должна быть подсказка снизу с тем, какую клавишу нужно нажать для активации BIOS. Обычно это Del, Esc, F2, но может отличаться. Если не удастся войти с первого раза, нужно будет снов перезагрузить ПК.
- Находим вкладку CPU config, Processor или Chipset.
- Ищем параметр Virtualization или Виртуализация.
- Нажимаем напротив него и выбираем опцию Enable. В зависимости от производителя он может называться Intel Virtualization Technology, AMD-V, Hyper-V, VT-X, Vanderpool, or SVM.
- Возвращаемся в начальное окно и жмем на вариант «Save & Exit».
2. Активировать аппаратную виртуализацию в PowerShell и настроить ОЗУ
Есть и другой вид виртуализации, так называемая вложенная, позволяющая запускать Hyper-V в виртуальной машине. Она нужна для запуска эмулятора телефона Visual Studio внутри виртуальной машины или тестировать конфигурации оборудования с использованием нескольких хостов. Части пользователей удалось исправить свою ошибку активацией вложенной виртуализации.
Инструкция по исправлению ошибки 0x80370102:
- Нажимаем правой кнопкой мыши по Пуску и выбираем PowerShell (или ищем через поиск). У нее должны быть права администратора.
- Вставляем команду Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true и нажимаем Enter.
- Правым кликом мыши выбираем виртуальную машину посредством диспетчера Hyper-V и переходим в ее «Настройки».
- Жмем на вкладку «Память» в панели слева и выключаем параметр «Включить динамическую память», просто вручную увеличиваем значение вдвое.
- Запускаем виртуальную машину.
- Кликаем правой кнопкой мыши по ней и выбираем «Подключиться». После запуска Hyper-V произойдет перезагрузка и при повторной попытке запуска ошибка уже не должна появляться.
3. Запустить компонент Hyper-V
Компонент Hyper-V нужен для того, чтобы администраторы могли получать больший контроль над собственным оборудованием при виртуализации нескольких операционных систем на одном оборудовании. Без него ошибка во время установки Linux гарантирована.
Нужно включить Hyper-V и вот, как это можно сделать:
- С помощью поиска переходим в «Панель управления».
- Открываем «Программы и компоненты».
- Жмем на элемент левого меню «Включение или отключение компонентов Windows».
- Ищем пункт Hyper-V (один из первых) и устанавливаем флаг возле него.
- Перезагружаем компьютер.
Это лучшее, что мы можем предложить для исправления ошибки WslRegisterDistribution failed with error: 0x80370102. Перечисленные методы работают у большинства, на это указывают ответы в комментариях на форумах, поэтому без зазрений совести можем их рекомендовать к использованию.
После установки Windows Subsystem for Linux (Подсистема Windows для Linux) и какого-либо дистрибутива Linux после его запуска вы можете получить сообщение об ошибке «WslRegisterDistribution failed with error» и каким-либо кодом ошибки: 0x80370114, 0x80370102, 0x8007019e, 0x800706be, 0x8000000d или другим.
В этой инструкции подробно о способах исправить такие ошибки и запустить Ubuntu, Debian или другой дистрибутив в WSL в Windows 11 и Windows 10.
Простые способы исправить ошибки WslRegisterDistribution
Сначала некоторые простые способы исправить проблему, которые могут сработать при ошибках «WslRegisterDistribution failed with error»:
- Если вы только что установили WSL и дистрибутив Linux, но не выполняли перезагрузку компьютера — выполните её и попробуйте снова: вполне возможно, всё заработает исправно.
- Убедитесь, что виртуализация включена в БИОС/UEFI компьютера, подробнее: Как включить виртуализацию.
- Установите обновление Подсистемы Windows для Linux с сайта Майкрософт.
- Попробуйте по порядку выполнить две команды:
wsl --update wsl --shutdown
в командной строке, запущенной от имени администратора.
- Установите доступные обновления Windows, если они давно не устанавливались, это действительно может сработать.
Дополнительно, если вы устанавливаете WSL в Windows, которая установлена в виртуальной машине, виртуализация должна быть включена и в ней. Например, в Hyper-V потребуется включить Nested Virtualization с помощью команды PowerShell:
Set-VMProcessor -VMName ИМЯ_ВМ -ExposeVirtualizationExtensions $true
Дополнительные варианты решения
Если предыдущие варианты не помогли, выполните следующие команды в командной строке, запущенной от имени администратора (если первая команда сообщит о том, что установка уже выполнена, перейдите к следующим командам):
wsl --install dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2
Если ошибка появилась на версии WSL 2, можно, наоборот, попробовать переключение на 1-ю версию в последней команде.
В некоторых случаях могут сработать следующие подходы:
- Используйте команду
bcdedit /set hypervisorlaunchtype auto
в командной строке, запущенной от имени администратора с последующей обязательной перезагрузкой компьютера.
- В Параметры — Приложения в списке установленных приложений откройте дополнительные параметры вашего дистрибутива Linux и используйте опцию «Сброс». Если это не помогло, можно попробовать удалить приложение, соответствующее дистрибутиву и установить его с помощью команд wsl или из Microsoft Store.
- Проверьте, появляются ли ошибки, если использовать другой дистрибутив Linux для WSL.
- Некоторые пользователи сообщают о том, что им помогает отключение компонентов «Платформа виртуальной машины», «Подсистема Windows для Linux» (и, если включен — Hyper-V), перезагрузка, повторное включение этих компонентов и повторная перезагрузка компьютера.
Надеюсь, один из предложенных вариантов поможет решить проблему. Будет отлично, если вы сможете поделиться в комментариях тем способом, который сработал для вашего случая.
Ok, I discovered the issue. Nested virtualization is not enabled on new Hyper-V VMs by default because it disables the Dynamic Memory feature for that VM. You have to enable it after the fact with a command on the host machine (make sure the target is powered off):
Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true
Alternatively, this command will enable it on every existing VM that is currently powered off (does not affect future VMs):
Get-VM | ? State -eq 'Off' | Set-VMProcessor -ExposeVirtualizationExtensions $true
** if this is off-topic, or belongs somewhere else, please let me know and I’ll move it. Also, if I read the thread correctly, this is regarding trying to enable WSL2 in a Windows 10 vm running on a linux host, but the errors that I’m seeing are basically the same **
Will running these commands on a Windows 10 host allow other hypervisors (particularly Virtualbox) to run with WSL2 enabled on the host also? I’ve found that enabling the VirtualMachinePlatform functionality for WSL2 on my host machine (specs below) gives me an error in both VMWare Workstation 12.5.6 and VirtualBox 6.0.8 r130520 (Qt5.6.2) that virtualization is not enabled in the bios even though it is. if i disable VirtualMachinePlatform and reboot, VMWare and VirtualBox both work again. I do not have Hyper-V installed on my machine. I’d love to take advantage of the benefits of WSL2, but for my docker development setup on my work machine, I need to be able to use at least VirtualBox, so this is a killer for me..
Machine Specs:
Dell xps 8900
32GB RAM
i7-8700 quad core with HyperThreading, all Virtualization enabled in the bios, XD Enabled in bios
Windows 10 Enterprise 1903 build 18362.10006
all latest updates for firmware/bios are installed, as are all the latest windows updates. Currently on the Slow Ring of the Windows Insider Program
Thanks!
- Home
- Partition Magic
- Fix: WSL Register Distribution Error 0x80370102 Windows 10 / 11
By Vega | Follow |
Last Updated
This “WslRegistertionDistribution failed with Error: 0x80370102” error message occurs when users try to install a Linux distribution to access via Windows Subsystem for Linux 2. If you are also one of them, this article from MiniTool Partition Wizard is what you need.
Windows already includes this new feature and users can install the Linux subsystem simply by enabling the “Windows Subsystem for Linux” feature. However, when downloading Linux distributions through Windows Subsystem for Linux or WSL, users encounter this error message “WslRegisterDistribution failed with error: 0x80370102”.
Windows Subsystem for Linux requires Hyper-V and virtualization to be enabled on our computer. Suppose you mistakenly disabled a feature on your computer after enabling Windows Subsystem for Linux. In this case, when starting WSL on your PC, you may encounter the error message:
WslRegisterDistribution failed with error: 0x80370102.
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.
Well, how to fix this error? The detailed steps to solve “WslRegisterDistribution failed with Error: 0x80370102” are shown below.
Fix 1: Enable Hyper-V
Hyper-V is a must-have feature or functionality for using the Windows Subsystem for Linux on Windows computers. If you don’t enable it, it will generate an error when installing a Linux distribution to access via Windows. So, enabling Hyper-V might solve the “WslRegisterDistribution failed with Error: 0x80370102” problem.
Step 1: Type turn Windows features on or off on the Search box and click the best-matched result.
Step 2: Check the Hyper-V option and click OK.
Then restart your computer and check if this issue gets fixed. If not, proceed with the next solution.
Fix 2: Enable Hardware Virtualization
In order to use the Hyper-V-powered Windows Subsystem for Linux on your PC, you need to turn on hardware virtualization. If you disabled WSL by mistake after installing it, you need to check and enable this feature from the BIOS. Until then, you can open Task Manager on your computer and switch to the Performance tab. Here you can find a tab called Virtualization.
Make sure the status shows Enabled. If not, you need to follow the steps below to enable hardware virtualization on your Windows PC.
Step 1: Restart your computer. Then press the specific hotkey to enter BIOS. The hotkeys may vary due to different brands. It usually is Esc, F2 or Del, etc.
Step 2: Once the BIOS window opens up, go to the Advanced tab, and press Enter to continue.
Note:
The Virtualization option may not be present in the Advanced tab on some computers. In this case, you’ll find it in the Performance tab.
Step 3: Use the arrows on your keyboard to select Virtualization and enable it.
After that, save the changes and reboot your computer.
Fix 3: Enable Nested Virtualization & Change RAM Settings
Nested virtualization is a feature that allows you to run Hyper-V inside a Hyper-V virtual machine (VM). This is useful for running the Visual Studio Phone Emulator in a virtual machine, or for testing configurations that typically require multiple hosts. Turning on nested virtualization has reportedly been a solution for many online users. So, follow these steps:
Step 1: Shut down your virtual machine in Hyper-V Manager.
Step 2: Press Win + X on your keyboard and select Windows PowerShell (Admin) from the popup list.
Step 3: In the PowerShell window, copy-paste this command and press Enter:
Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true
Step 4: Right-click your virtual machine in Hyper-V Manager and select Settings.
Step 5: Click Memory in the left pane, uncheck Enable Dynamic Memory, and set the RAM value to twice the current value, e.g.2048 > 4096.
Step 6: Click Apply and OK to save the changes.
Step 7: Start your virtual machine. Then right-click on your virtual machine and select Connect. This will run Hyper-V and your system will reboot.
Later, try running Ubuntu again to test to see if the “WslRegisterDistribution failed with Error: 0x80370102” issue is resolved.
About The Author
Position: Columnist
Vega joined MiniTool as an editor after graduation. She enjoys helping people with computer problems, including disk management, data recovery, and more. She is constantly expanding her knowledge in related fields. And she will continue to bring more easy-to-understand professional articles to help people solve various problems on the PC. In her daily life, Vega enjoys hanging out with friends, shopping online and listening to music. She is someone who knows how to enjoy life.
It’s worth verifying the machine meets the hardware requirements.
Buried in the WSL troublshooting page under “Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS” the first item is to check Hyper-V System Requirements.
WSL 2 uses a subset of Hyper-V for virtualization, so while you don’t need Win 10 Pro, you do still need the hardware to be able to run Hyper-V.
At the time of writing, the docs say Hyper-V requires the following:
- 64-bit Processor with Second Level Address Translation (SLAT).
- CPU support for VM Monitor Mode Extension (VT-x on Intel CPU’s).
- Minimum of 4 GB memory. As virtual machines share memory with the Hyper-V host, you will need to provide enough memory to handle the expected virtual workload.
A quick way to check requirements: run msinfo32.exe
and under System Summary
at the very bottom it notes the Hyper-V requirements:
…in my case, I’m out of luck as my processor lacks SLAT.