Cannot create new vm

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Armit
Posts: 4
Joined: 1. Nov 2016, 19:36

Cannot create new vm

Post by Armit »

Install VirtualBox-5.1.8-111374-Win as Admin on Windows 7. Appears to install without issue. But when trying to create new VM (several configurations tried) I get
Failed to acquire the VirtualBox COM object. The application will now terminate.

Failed to instantiate CLSID_VirtualBox w/ IVirtualBox, but CLSID_VirtualBox w/ IUnknown works.
PSDispatch looks fine. Weird.

Result Code: E_INVALIDARG (0x80070057)
Component: VirtualBoxClientWrap
Interface: IVirtualBoxClient {d2937a8e-cb8d-4382-90ba-b7da78a74573}
This is my first time using VirtualBox, so I don't know where to begin debugging this. Any help welcome.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cannot create new vm

Post by scottgus1 »

You need to install Virtualbox by right-clicking the installer .exe and choosing "Run As Administrator" from the right-click menu.
Armit
Posts: 4
Joined: 1. Nov 2016, 19:36

Re: Cannot create new vm

Post by Armit »

Nope.

Uninstalled --> restart --> run VirtualBox-5.1.8-111374-Win.exe as Administrator --> start Virtualbox --> new --> same error as above.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot create new vm

Post by mpack »

AFAIK, that error message only happens when running a VM when VirtualBox was installed for the wrong user (e.g. "Administrator"). This is not at all the same thing as using "Run as administrator", which grants temporary admin rights to the correct user.
Armit
Posts: 4
Joined: 1. Nov 2016, 19:36

Re: Cannot create new vm

Post by Armit »

I'm not totally sure I understand you, but I tried this:
- uninstall VirtualBox (as normal user from Control Panel>Programs>Programs and Features>uninstall)
- restart, logging in as Administrator
- copied install exe from User>>Downloads to Administrator desktop
- ran exe (not "Run as Administrator"); program installed without issue
- restart, logging in as normal user
- start VirtualBox --> New --> same error as original post
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cannot create new vm

Post by scottgus1 »

Where's the right-click? I don't see a right-click!
Armit wrote:Nope.
I guess that's Nope you didn't do what I suggested then.
Armit wrote:ran exe (not "Run as Administrator");
scottgus1 wrote:install Virtualbox by right-clicking the installer .exe and choosing "Run As Administrator" from the right-click menu.
As far as I know, slightly different from Mpack's vastly superior knowledge, the actual account under which Virtualbox is installed hasn't been important in my usage. I have a Windows 10 laptop with Virtualbox installed (by right-click-Run-As-Administrator, hint, hint, wink, wink) in one account and VB runs perfectly on another account. The only thing is that the list of guests does not propagate to the second account. But I could re-register my guests just fine and use them on the second account.

That said, I haven't dug deeply into VB on that laptop like I have on my workstation and the office server, where the account using Virtualbox is the account it was installed on (by right-click-Run-As-Administrator just in case we missed it the other times) so there may be unexpected issues by switching accounts. YMMV. And so may mine eventually...
Armit
Posts: 4
Joined: 1. Nov 2016, 19:36

Re: Cannot create new vm

Post by Armit »

Dear scottgus1, it is possible that other posters may be at least as clever as you. In writing
run VirtualBox-5.1.8-111374-Win.exe as Administrator -->
I thought it would be apparent I had used "run ... as administrator" which is only available from the right-click menu.

A quick list for others reading this (let me know if you are too confused to go on):
- installed as User, ran as User,
- installed as User using (right-click) "run as administrator", ran as User,
- installed as User using (right-click) "run as administrator", ran using "run as administrator"
- installed as administrator, ran as administrator
- installed as administrator using (right-click) "run as administrator", ran using "run as administrator"
- installed as administrator, restarted, ran as User

All with same error message as original post.

If you have a working program, can you recall what rights you installed and run it on. Thanks.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cannot create new vm

Post by scottgus1 »

Armit, I'm certainly not trying to be "clever". I based my response on your first two posts. Your second post is worded as if it is a clarification of what you did in your first post, as a response to my advice. Your second post makes it clear that you logged out and back in on an admin account and ran the installer normally, making a special mention that you did not use the right-click-run-as-admin. Your own information led me to believe that the right-click-run-as-admin was not used in your first post.

FWIW, "log out and log back in as admin" and "right-click-run-as-admin" have been confused tremendously by new users of Virtualbox. Your first post merely said you ran the installer as admin. This wording fits either of the two methods quoted after the FWIW at the start of this paragraph. You clearly stated in your first post my advice did not work and the second post says you did not use right-click-run-as-admin. Thus my response. Maybe a little more clarity is necessary?

The final list of steps you tried is clear. And clearly there is something wrong with your host computer. "installed as User using (right-click) "run as administrator", ran as User," should have worked. Could be that so many installs have messed something up. Aside from a complete uninstall, perhaps a complete clearing of anything Virtualbox-related from the registry (take a backup first) then a complete power down then restart, then a reinstall using (right-click) "run as administrator" on the account you plan to run guests with, I am out of ideas.

Hope you get it working!
WindowViper
Posts: 3
Joined: 11. Feb 2017, 22:53

Re: Cannot create new vm

Post by WindowViper »

Wow!

I've spent hours this afternoon fighting a very similar error message indicating a bad installation and finally got past it. I thought I had won. Now I am experiencing the problem described above where I have what seems to be a good installation but I cannot start the VM (Result Code: E_INVALIDARG (0x80070057)). Invalid argument? What argument! This is a GUI, not a command line.

And then I read the dialog above. Right click, wrong click, VirtualBox is sick. This thing is just full of traps, one right after another!

Life is short. I give up.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Cannot create new vm

Post by BillG »

It can be confusing (and it is slightly different again in Windows 10) but it is not really difficult. And there is not much that the VirtualBox devs can do about it because it is Windows which requires these things. You must have admin privilege to install a program but you do not want or need admin privilege to run it, but you must "own" (ie have write privilege right to) the Virtualbox files to create a new vm.

To sum up, you need admin privilege to install any program in Windows but the program and its associated files should be owned by the user. The easiest way to do that is to run the installer as a user with admin privilege, not as the administrator.

I have only ever seen the COM object message when the user starting VirtualBox did not own the Virtualbox files for the vm.
Bill
GnstheGrain
Posts: 5
Joined: 22. Jul 2016, 06:07
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: ...

Re: Cannot create new vm

Post by GnstheGrain »

@Armit
I solved this replacing the "Default" value of InprocServer32 subkey from "oleaut32.dll" to "C:\Windows\system32\oleaut32.dll" on those two key:
HKEY_CLASSES_ROOT\CLSID\{00020420-0000-0000-C000-000000000046}
HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-000000000046}

src: http://www.itwendao.com/article/detail/368883.html
sundar
Posts: 1
Joined: 4. Oct 2017, 06:31

Re: Cannot create new vm

Post by sundar »

GnstheGrain wrote:@Armit
I solved this replacing the "Default" value of InprocServer32 subkey from "oleaut32.dll" to "C:\Windows\system32\oleaut32.dll" on those two key:
HKEY_CLASSES_ROOT\CLSID\{00020420-0000-0000-C000-000000000046}
HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-000000000046}
Finally it worked by simply replacing with the absolute path to the registry.

Thanks a ton. The above is the only work around for this issue.
RJBarber
Posts: 1
Joined: 13. Nov 2018, 19:40

Re: Cannot create new vm

Post by RJBarber »

Over a year later and this is not resolved? This is why great pieces of software cannot overtake the competition and garner more support from third party developers and the user base. This issue is low hanging fruit by developers standards yet a show-stopper for all users who lack the technical knowledge or the finances to spend hours searching for this obscure solution. A registry hack.

I tried installing VirtualBox in 2016. Couldn't get it to work and wasted many hours of my time then. Have been using MS and VMware offerings since I didn't have any more time or finances to waste on searching for a solution. Recently decided to see if Oracle fixed this problem. Still not. But I stuck with it for a few days on my off time wasting hours reading forum after unhelpful forum before finally finding this one with an actual and incredibly simple solution. How many others have abandoned this great product in the interest of not wasting valuable time searching for obscure solutions to show-stopper issues like this that could have easily been fixed long ago? Sad really.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot create new vm

Post by mpack »

Over a year later and you still did not absorb the fact that there is nothing VirtualBox can do about how Windows works?

Here's a radical solution: maybe read the thread before posting on it?
juansts
Posts: 1
Joined: 21. Apr 2019, 09:42
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Ubuntu, Windows

Re: Cannot create new vm

Post by juansts »

GnstheGrain wrote:@Armit
I solved this replacing the "Default" value of InprocServer32 subkey from "oleaut32.dll" to "C:\Windows\system32\oleaut32.dll" on those two key:
HKEY_CLASSES_ROOT\CLSID\{00020420-0000-0000-C000-000000000046}
HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-000000000046}
2 years later this solution still works. VirtualBox 5.2.28 on Windows 7 64 bit.
Thanks a lot, @GnstheGrain
Post Reply