Jump to content

VirtualBox on WinPE3


geogauci

Recommended Posts

Hi!

I'm trying to run VirtualBox 3.2 on WinPE3 using the following script:

regsvr32 /s virtualbox\VBoxC.dll

copy virtualbox\drivers\network\netflt\VBoxNetFltNotify.dll X:\Windows\system32\VBoxNetFltNotify.dll

copy virtualbox\drivers\network\netflt\VBoxNetFlt_m.inf X:\Windows\inf\VBoxNetFlt_m.inf

copy virtualbox\drivers\network\netflt\VBoxNetFlt.inf X:\Windows\inf\VBoxNetFlt.inf

copy virtualbox\drivers\network\netflt\VBoxNetFlt.sys X:\Windows\system32\drivers\VBoxNetFlt.sys

snetcfg -v -l X:\Windows\inf\VBoxNetFlt.inf -c s -i sun_VBoxNetFlt

snetcfg -v -l X:\Windows\inf\VBoxNetFlt_m.inf -c s -i sun_VBoxNetFltmp

regsvr32 /s VBoxNetFltNotify.dll

drv_ctl --inst-nostart VBoxDrv virtualbox\drivers\VBoxDrv\VBoxDrv.sys

drv_ctl --inst-nostart VBoxUSB virtualbox\drivers\USB\device\VBoxUSB.sys

drv_ctl --inst-nostart VBoxUSBMon virtualbox\drivers\USB\filter\VBoxUSBMon.sys

net start VBoxNetFlt

net start VBoxDrv

net start VBoxUSBMon

start virtualbox\VBoxSVC.exe

start virtualbox\Virtualbox.exe

pause

The services are failing to start though.

Output:

H:\T2\VBox>regsvr32 /s virtualbox\VBoxC.dll

H:\T2\VBox>copy virtualbox\drivers\network\netflt\VBoxNetFltNotify.dll X:\Windows\system32\VBoxNetFltNotify.dll

1 file(s) copied.

H:\T2\VBox>copy virtualbox\drivers\network\netflt\VBoxNetFlt_m.inf X:\Windows\inf\VBoxNetFlt_m.inf

1 file(s) copied.

H:\T2\VBox>copy virtualbox\drivers\network\netflt\VBoxNetFlt.inf X:\Windows\inf\VBoxNetFlt.inf

1 file(s) copied.

H:\T2\VBox>copy virtualbox\drivers\network\netflt\VBoxNetFlt.sys X:\Windows\system32\drivers\VBoxNetFlt.sys

1 file(s) copied.

H:\T2\VBox>snetcfg -v -l X:\Windows\inf\VBoxNetFlt.inf -c s -i sun_VBoxNetFltTrying to install 'sun_VBoxNetFlt'...

..failed. Error code: 0x80070002

H:\T2\VBox>snetcfg -v -l X:\Windows\inf\VBoxNetFlt_m.inf -c s -i sun_VBoxNetFltmp

Trying to install 'sun_VBoxNetFltmp'...

...X:\Windows\inf\VBoxNetFlt_m.inf was copied to X:\windows\INF\oem8.inf

..failed. Error code: 0x800f0201

H:\T2\VBox>regsvr32 /s VBoxNetFltNotify.dll

H:\T2\VBox>drv_ctl --inst-nostart VBoxDrv virtualbox\drivers\VBoxDrv\VBoxDrv.sys

failure: CreateService, ERROR_SERVICE_EXISTS

H:\T2\VBox>drv_ctl --inst-nostart VBoxUSB virtualbox\drivers\USB\device\VBoxUSB.sys

failure: CreateService, ERROR_SERVICE_EXISTS

H:\T2\VBox>drv_ctl --inst-nostart VBoxUSBMon virtualbox\drivers\USB\filter\VBoxUSBMon.sys

failure: CreateService, ERROR_SERVICE_EXISTS

H:\T2\VBox>net start VBoxNetFlt

The service name is invalid.

More help is available by typing NET HELPMSG 2185.

H:\T2\VBox>net start VBoxDrv

System error 3 has occurred.

The system cannot find the path specified.

H:\T2\VBox>net start VBoxUSBMon

System error 3 has occurred.

The system cannot find the path specified.

H:\T2\VBox>start virtualbox\VBoxSVC.exe

H:\T2\VBox>start virtualbox\Virtualbox.exe

H:\T2\VBox>pause

Press any key to continue . . .

I'm still new to WinPE development, so I would really appreciate any help!

(Pls ignore the ERROR_SERVICE_EXISTS error)

Link to comment
Share on other sites


There are 2 steps you need to do before trying to get an app to work.

1. Determine the memory footprint. WinPE x86 will require 512MB RAM and x64 requires somewhere over that, but let's just say 1GB RAM. In my experience, even a PC with 4GB RAM using WinPE 2.1 x86 cannot properly run on a 2GB boot.wim. You also need to consider how big your Ramdisk needs to be and/or if VirtualBox will want to write cache files somewhere.

2. Now that you have VirtualBox in your PE, run Depends (Dependency Walker) on it FROM the PE. Do not bother running Depends on VirtualBox from a normal OS, you will get back too much information.

Link to comment
Share on other sites

Thank you for your reply.

I'm testing on a physical hardware, having 2GB RAM, and I'm using WinPE3 x86 so I'm guessing this is not a RAM problem.

The boot.wim is 273MB large.

Is it really necessary to have a RamDisk? I'm trying to load VirtualBox directly from a USB stick.

I tried depends, and it seems like all dependencies are in place.

That said, it seems that the drivers are failing to load even before I try to run Virtualbox.exe. I'm trying to keep an eye on what's happening using ProcMon.exe from sysinternals, and I've noticed a lot of "BUFFER OVERFLOW" and "NAME NOT FOUND" errors (the latter are issued during reg operations).

Could it be that the image size I'm using is too small?

Edited by geogauci
Link to comment
Share on other sites

By default you should have a 32MB Ramdrive. If you want to put files into the X:\ then you want the Ramdrive.

Unfortunately, I think you can ignore the buffer overflow and Name Not Found "errors" that you see in ProcMon. They happen on every system I've ever ran it on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...