Yesterday I got the “NS_ERROR_FAILURE (0x80004005)” error when starting a VM instance in VirtualBox. Reinstalling didn’t work and the error was still there. The real problem is the security permission. Go to “System Preferences -> Security & Privacy”, confirm the permission needed by VirtualBox, then the problem is solved.
I remember that, some days before I was prompted whether I would grant permission for some app created by “Oracle” and I chose no. At that time I was not using VirtualBox and I was not aware that this was related to VirtualBox.
Another fact I found is about the VirtualBox VM window. After this issue and I reinstalled VirtualBox, the VM window can be moved correctly. Previously moving the VM window would not move the window content in it which was very weird.