Virtualbox код ошибки ns error failure 0x80004005

After a long, friendly and fruitful chat with @DavidFoerster, it turned out that Microsoft and its weird update policy was the culprit!

David patiently guided me through the reinstallation of the VirtualBox packages from the Ubuntu repositories and check out the configuration (dkms, extension packages, etc.). At last, he asked me to try a new installation with a live ISO. It was then that I noticed that my «Default Machine Folder» defined in VirtualBox - File - Preferences - General was not usable. I knew that it was on a mounted NTFS used by the dualboot Win10 system. A closer look showed that at present it was mounted read-only, which prevented the virtual machines from starting (with a not very helpful error message).

As I recalled then, shortly after I had last successfully booted the VirtualBox guests, I had not only got Ubuntu updates, but I had also booted for the first time since long my native Win10 system. Apparently, Microsoft had then installed updates AND had reactivated the ‘fast startup’ option (which certainly had been deactivated before!) — so that later, back in Ubuntu, the NTFS file system was mounted in read-only mode, as Windows had not properly shut down.

Now that I have again deactivated the ‘fast startup’ option in Windows10, my guest systems are running again.

Thank you, David, for asking the right question which set me on the right track!

After a long, friendly and fruitful chat with @DavidFoerster, it turned out that Microsoft and its weird update policy was the culprit!

David patiently guided me through the reinstallation of the VirtualBox packages from the Ubuntu repositories and check out the configuration (dkms, extension packages, etc.). At last, he asked me to try a new installation with a live ISO. It was then that I noticed that my «Default Machine Folder» defined in VirtualBox - File - Preferences - General was not usable. I knew that it was on a mounted NTFS used by the dualboot Win10 system. A closer look showed that at present it was mounted read-only, which prevented the virtual machines from starting (with a not very helpful error message).

As I recalled then, shortly after I had last successfully booted the VirtualBox guests, I had not only got Ubuntu updates, but I had also booted for the first time since long my native Win10 system. Apparently, Microsoft had then installed updates AND had reactivated the ‘fast startup’ option (which certainly had been deactivated before!) — so that later, back in Ubuntu, the NTFS file system was mounted in read-only mode, as Windows had not properly shut down.

Now that I have again deactivated the ‘fast startup’ option in Windows10, my guest systems are running again.

Thank you, David, for asking the right question which set me on the right track!

Let’s look at this from a troubleshooting perspective. The number one thing to do instead of guessing is diagnose and the best way to do that when you don’t know what the problem is. I’ll take you through the steps for my particular use case but it should give you a general idea on how to look at the problem in order to find the correct solution.

a.-Have a look at the actual logs of the VM:

Click on the Menu Item, you should see three choices:

  1. Details
  2. Snapshots
  3. Logs

Look for this error code:
VMSetError and look for the matching RETURN CODE (rc)
rc=VERR_VD_IMAGE_READ_ONLY

In the example below the file under /build/virtualbox….is in read only mode.

 VMSetError: /build/virtualbox-8vePuu/virtualbox-6.1.16-dfsg/src/VBox/Devices/Storage/DrvVD.cpp(5228) int drvvdConstruct(PPDMDRVINS, PCFGMNODE, uint32_t); rc=VERR_VD_IMAGE_READ_ONLY

b.-Interpret what that means:
But the problem is the /build directory does not exist at all. So what the rc above really means is that it cannot FIND that file, because /build doesn’t even exist (nor it seems to be supposed to).

cd: /build/virtualbox-8vePuu/virtualbox-6.1.16-dfsg/src/VBox/Devices/Storage/: No such file or directory
root@pop-os:~# cd /build/virtualbox-8vePuu/virtualbox-6.1.16-dfsg/
-bash: cd: /build/virtualbox-8vePuu/virtualbox-6.1.16-dfsg/: No such file or directory
root@pop-os:~# cd /build
-bash: cd: /build: No such file or directory
root@pop-os:~# ls /
bin   dev  home  lib32  libx32      media  opt   root  sbin  sys  usr
boot  etc  lib   lib64  lost+found  mnt    proc  run   srv   tmp  var

Another thing to notice is that for my case other VMs with VDIs in the same location don’t have the problem.
That completely discards two possibilities:

  • There’s a problem with the install of Virtual Box
  • There’s an actual file permissions issue

The possibility is that the VM got corrupted at some point during shut down and that created the config corruption, not a VDI corruption at the VM level, not VirtualBox level.

Unless you power off your VM the «Close» function on your Vm window will ALWAYS save the state of the machine, so «Discarding» the state is only possible when you have two or more states because in that case at a minimum there is always the LAST state.

The conclusion is then that the corruption is at the VM state level and we need to get rid of that.

c.-Solution:

Go to VM-> Menu->Snapshots -> Clone

Create a linked Clone. That will simply copy the config files to the right place and link with the same VDI.

Start that one.
If it starts you know you have a problem with the original VM. You can either re-create the VM and point to the existing VDI or create a full clone (it will take longer) and the delete the original.

To prevent this (at least for my case), avoid sending the Power Off Message to your VM when closing, better use the ACPI Shutdown method as Power off can leave (as we saw) your machine on an unwanted state.

Problem

After updating my MacBook macOS Big Sur to version 11.6.5, I was getting the below NS_ERROR_FAILURE error while trying to launch the Windows virtual machine on VirtualBox 6.1. I was unable to launch the virtual machine. I got the same error after updating macOS Big Sur to version 11.6.8 as well.

Errors

Failed to open a session for the virtual machine MacWin2.

The virtual machine ‘MacWin2’ has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)

Component: MachineWrap

Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

VirtualBox Error NS_ERROR_FAILURE (0x80004005) On MacOS

At the same time another error window appeared with the below error:

Kernel driver not installed (rc=-1908)

Make sure the kernel module has been loaded successfully.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) – The support driver is not installed. On linux, open returned ENOENT.

Kernel driver not installed (rc=-1908) error

Solution 1: (Restart The Mac)

Before thinking too much, make sure you have restarted your Mac after completing the OS update.

In my case, after updating the OS, even before restarting my Mac, I tried to launch the virtual machine and got the errors. After restarting the Mac, the errors vanished. So, before trying anything dramatic, try restarting the Mac. If you are still getting the error, then try the below solutions one by one.

Solution 2: (Re-enable SIP)

The next thing to do is to check and make sure SIP (System Integrity Protection) is enabled. To check it, run this command in the terminal.

SIP is enabled in MacOS

System Integrity Protection should be in enabled state. If it is in disabled state for some reason, then enable it by following these steps:

  1. Restart the Mac by holding the Command and R keys together.
  2. Leave the keys when the apple logo appears.
  3. In the recovery mode, go to the Utilities menu.
  4. Select Terminal.
  5. In the terminal window, run the below command to enable SIP and reboot the Mac.
  1. Allow the mack to launch in normal mode.
  2. Launch terminal and run the command csrutil status and make sure SIS is enabled.

Solution 3: (Access Device Permission)

  1. Quit VirtualBox.
  2. In the Mac, launch the System Preferences.
  3. Go to Security & Privacy.
  4. Go to the Privacy tab.
  5. Unlock the privacy screen to make changes by pressing the lock icon at the bottom left of the screen and provide your authentication.
  6. From the left panel, go through the permissions Accessibility, Input Monitoring, Full Disk Access, Files and Folders and make sure VirtualBox.app is listed under the allow list (right panel) and the checkbox is selected. If not then add it to the list using the + button and select the check boxes.
  7. Launch VirtualBox and the virtual machine.

Give access permissions to VirtualBox.app

If you are still getting the NS_ERROR_FAILURE (0x80004005) error, then try the below solution.

Solution 4: (Allow identified developer in Security & Privacy)

Usually this solution is needed when you get errors after installing VirtualBox. As we are discussing the errors obtained after updating macOS, this solution may be irrelevant. Still I’m adding this solution here, just to check the settings before moving to the next solution.

  1. Quit VirtualBox.
  2. Launch the System Preferences.
  3. Go to Security & Privacy >> General tab.
  4. In the General tab, Unlock the security and privacy screen to make changes by clicking on the lock icon at the bottom of the screen and provide your authentication.
  5. Under the Allow apps downloaded from section, make sure the App Store and identified developers option is selected.
  6. Keep the System Preferences screen open and launch the virtual box and then the virtual machine. If the errors appear again, check the System Preferences >> Security & Privacy >> General tab and see if there is a warning like System software from developer “Oracle America, Inc.” was blocked from loading along with an Allow button that appears below the App Store and identified developers option. If so, press the Allow button.
  7. Quit the VirtualBox and launch it again.

Solution 5: (Update VirtualBox)

If the above solution were not fixing the problem, then see if there is any update available for the VirtualBox and install the update if there is any. To update the VirtualBox to its latest version follow these steps:

  1. Launch VirtualBox.
  2. From the menu select VirtualBox >> Check for updates…
  3. A small screen will popup and check for any update.
  4. If there is any update available, another window will popup and display the available update and the link of the dmg file.
  5. Download the dmg and follow the installation process.
  6. Once installed, perform the steps listed in Solution 4 above.

Update virtual box to its latest version

Solution 6: (Re-install VirtualBox)

If none of the above solutions are not fixing the NS_ERROR_FAILURE (0x80004005) error, then uninstall the VirtualBox and re-install it again.

Uninstalling VirtualBox

  1. To uninstall the VirtualBox, download the latest version from https://www.virtualbox.org/wiki/Downloads. Open the installation package. In the installation screen, you can see the uninstallation package VistualBox_Uninstall.tool at the bottom right corner.
  2. Right click VistualBox_Uninstall.tool and select Open with >> Terminal.
  3. In the terminal window, the uninstallation scripts will be opened and executed. Finally displays the list of VirtualBox programs installed in the Mac.
  4. Type Yes to confirm the installation process.

VirtualBox installation window

VirtualBox uninstallation script. Fix for NS_ERROR_FAILURE (0x80004005)

Clear existing permissions

  1. Restart the Mac in recovery mode by holding the Command and R keys together.
  2. Leave the keys when the apple logo appears.
  3. In the recovery mode, go to the Utilities menu.
  4. Select Terminal.
  5. In the terminal window, run the below command to clear all the existing permissions and then reboot the Mac.

Instal VirtualBox

Finally install the fresh copy of the VirtualBox using the dmg file downloaded earlier. After installation, if needed, perform the steps mentioned in Solution 4 and then Solution 3 above.

Reference

  • Details about NS_ERROR_FAILURE error at VirtualBox.org Forums.

Related Topics

  • Shrinking VirtualBox virtual machine vdi on macOS with Windows 10 guest OS.
  • Increasing the disk space of Windows guest OS In VirtualBox on macOS.

Linux код ошибки 0x80004005 virtualbox

Всем привет сегодня поговорим о ошибке 0x80004005 Linux которая в основном связана с VirtualBox. У этой ошибки есть различные причины так что разберём несколько из них. 

Ошибка: Не удалось создать COM-объект VirtualBox. NS_ERROR_FAILURE (0x80004005)

Решение:

  • Отключите машину и в свойствах отключите подмонтированный привод.
  • Удалите полностью VirtualBox и установите заново
  • Попробуйте скопировать старые конфигурации VirtualBox
  • Попробуй заново создать виртуальную машину
  • Иногда помогает удаление /home/maksim/.VirtualBox/VirtualBox.xml
  • При загрузке Ubuntu, есть экран с выбором «Обычная загрузка», «Загрузка консоли» и «Memory Test». Запускаем в режиме Memory Test и ждем окончания проверки.
  • Полностью обновите систему
  • Создайте заново виртуальную машину выберите старый жесткий диск, потом запустите sudo /etc/init.d/vboxdrv setup

Ошибка: Не удалось открыть файл VMDK  имеется несоответствие между таблицами VERR_VD_VMDK_INVALID_HEADER  (0x80004005)

Решение: 

  • Загрузите комплект VDD с VMWare выполните следующую команду: vmware-vdiskmanager -R
  • В главном окне Oracle VM VirtualBox Manager выберите виртуальную машину, которая не запускается. Нажмите на снимки в правом верхнем углу. Выберите предпоследнию запись. Щелкните правой кнопкой мыши по нему и выберите «Восстановить»

Ошибка: VT-x отключен в BIOS для всех режимов процессора VERR_VMX_MSR_ALL_VMX_DISABLED (0x80004005)

Решение: Включите в биосе поддержку vt-x

Ошибка:  Не удалось открыть сессию для виртуальной машины WInXP  NS_ERROR_FAILURE (0x80004005)

Решение: 

Установите все репаки

  • Сommunity/virtualbox 4.1.8-1
  • Powerful x86 virtualization for enterprise as well home use community/virtualbox-additions 4.1.8-1
  • The official all-in-one VirtualBox Guest Additions ISO/CD image local/virtualbox-ext-oracle 4.1.8-1
  • Oracle VM VirtualBox Extension Pack community/virtualbox-modules 4.1.8-1
  • Kernel modules for VirtualBox community/virtualbox-source 4.1.8-1
  • VirtualBox kernel modules source

Выполните команду  modprobe vboxdrv

Ошибка:Виртуальная машина неожиданно прервалась во время запуска NS_ERROR_FAILURE (0x80004005)

Решение: Попробуйте обновить пакет virtualbox-host-modules или лучше запустить полное обновление.

  • Для этого просто запустите: $ sudo pacman -Syu
  • Перезагружаем модуль ядра: $ sudo / sbin / rcvboxdrv setup
  • Загрузка модулей: vboxnetadp vboxnetflt vboxpci vboxdrv

Если не помогло то найдите установленные модули хоста virtualbox: 

  • $ pacman -Q | grep
  • virtual virtualbox 5.2.18-1
  • virtualbox-guest-iso 5.2.18-1
  • virtualbox-host-modules-arch 5.2.18-8
  • virtualbox-sdk 5.2.18-1

И замените  пакет virtualbox-host-modules-arch на пакет  virtualbox-host-dkms как показано ниже.

  • $ sudo pacman -Syu
  • $ sudo pacman -S virtualbox-host-dkms

Вам будет предложено удалить пакет virtualbox-host-modules-arch . Просто введите Y и нажмите ENTER, чтобы установить virtualbox-host-dkms .Убедитесь, что вы установили заголовки ядра:

  • $ sudo pacman -S linux-заголовки

Наконец, выполните следующие команды:

  • $ sudo modprobe vboxdrv
  • $ sudo / sbin / rcvboxdrv setup

Перезагрузите систему, и теперь VirtualBox должен работать.

Еще один вариант убеждаемся что virtualbox-dkms был установлен  выполнив команду: dpkg -l | grep virtualbox-dkms

Потом очищаем и переустанавливаем  dkms:

  • apt-get purge virtualbox-dkms &
  • & sudo apt-get install dkms

Далее делаем перестройку ядра:

  • sudo /sbin/vboxconfig

Ну и последний вариант переходим в папку ~/.config/VirtualBox ищем файл VirtualBox.xml-prev и переименовываем его в VirtualBox.xml

Ошибка: The installer failed with exit code 254 Используйте —help для вывода списка доступных параметров..

Решение: обновлением VirtualBox до актуальной версии: командой

VBoxManage extpack install —replace Oracle_VM_VirtualBox_Extension_Pack-<версия_плагина>.vbox-extpack

На этом все надеюсь данные советы вам помогут. В комментариях пишите свое мнение о этой ошибке и как вы ее побороли будет интересно почитать. Спасибо!

{youtube}WmXoqwkqiQQ{/youtube}

Комментарии ()

Оставьте свой комментарий

Понравилась статья? Поделить с друзьями:
  • Visio ошибка 0xc0000142
  • Vipnet client деловая почта ошибка открытия почтовой базы
  • Virtualbox выдает критическую ошибку
  • Vis ошибка scania
  • Viper evo x ошибка карты памяти