Jump to content











Photo
* * * * * 1 votes

Booting VirtualBox with USB workaround

usb virtualbox grub4dos plop

Best Answer steve6375 , 26 February 2013 - 12:18 PM

Is the Win7 64-bit or special in any way? Did you try an plain MS Win7 32-bit ISO extracted to a USB drive?

How about creating a virtual HDD, mounting the HDD, copying the USB stick to the virtual HDD, dismounting it, then boot from it via VBox?

Go to the full post


  • Please log in to reply
307 replies to this topic

#101 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 June 2013 - 01:29 PM

Oh, a warning: don't use VMS while VirtualBox Manager is open because VirtualBox Manager doesn't "like" VMs settings been modified by other program (other than "vboxmanage.exe").

Both programs (VMS and VBM) modifies the same configuration files so a "clash" is normal...

Just now I'm implementing this warning in VMS...



#102 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 June 2013 - 02:22 PM

Sorry for the nth-posting :D

And, Steve, I think this might be the source of the problems that you mentioned...
When you start a VM from VirtualBox as well, it's the same thing when you start the VBM. Plus, in both cases, it takes some time to close 100% after the window is closed, especially on a slow computer (like a laptop using a not so fresh Windows 7 x64).
And if you change the settings and restart the VM fast, it might "clash" with VMS.
Why it doesn't happen on my computer also? Because I have a very fast computer with a fast OS so I have to be very fast (typing and clicking) as well but I usually can't (some medical problems).

I will search for a way to detect that VirtualBox is not completely closed. Until then you could try not to start a VM so fast after you closed VirtualBox Manager or a VirtualBox VM.



#103 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 June 2013 - 03:28 PM

I was leaving VMManager open all the time. I was also leaving my USB vmdk as Primary Master as I thought VMS would just replace this.

 

If I set up a new VM as

 

IDE Primary Master = MyUSB2.vmdk 

IDE Primary Slave   = HDD VHD

SATA Port 0 = (unused)

 

then this causes problem with VMS  (it just adds a Secondary Master vmdk) but still boots from my original vmdk (for USB port 2).

 

If I set up a new VM as

IDE Primary Master = (not used)
IDE Primary Slave   = HDD VHD

SATA Port 0 = (unused)

then all is OK.

 

Also all is OK if  I set up a VM as

IDE Primary Master = (not used)

IDE Primary Slave   = (not used)

SATA Port 0 = HDD VHD



#104 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 June 2013 - 03:59 PM

I was leaving VMManager open all the time.

 

I implemented the warning in VMS. It waits about 10 secondes after VB closes.
Oh and I noticed that VBoxSVC.exe is closed a few secondes later after VirtualBox.exe is closed so this could be the cause. If yes, a simple cycle waiting for this exe to close will solve the problem for all the computers.

 

I was also leaving my USB vmdk as Primary Master as I thought VMS would just replace this.

 

If I set up a new VM as

 

IDE Primary Master = MyUSB2.vmdk 

IDE Primary Slave   = HDD VHD

SATA Port 0 = (unused)

 

then this causes problem with VMS  (it just adds a Secondary Master vmdk) but still boots from my original vmdk (for USB port 2).

 

 

Ok. If it does the same after at least 10..20 sec VB was closed, then it could be a different problem.
It should at least detach your usb vmdk but it doesn't. A question: where is this file located, near the VBox or elsewhere (and where)?
Do you have UAC enabled? If yes, which setting...?
I'm asking you again: could you please send me your vmdk file, its location, the Virtualbox.xml file + the vbox file in all 3 stages + the VM entry settings in VMS..?
This will help me to reproduce the problem in my Windows 7 x64.

Thank you.



#105 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 412 posts
  •  
    Germany

Posted 23 June 2013 - 04:20 PM

4.2.14 , you know ? it's your buxfix on it ?

 

best regards

Blacky



#106 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 June 2013 - 04:52 PM

Thank you, Blackcrack.

Unfortunately, the "10 sec delay at restart" bug is not fixed. I reported a few other bugs in the bugtracker, they aren't fixed as well.
And regarding the bug reported by Steve, I don't think it's from VirtualBox but I guess it's wise to check... But only Steve can confirm since I can't reproduce it on my computer...



#107 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 June 2013 - 11:02 PM

1.0 Beta 5 version (a long way 'till Beta 100 :D ):

Changes:

Improvement: error messages are a little better.
BugFix (partial from VB): warns the user that VirtualBox (manager or machine) is running and asks to be closed. After it's closed waits 10 sec to be absolutely sure that all is closed. On my computer 1..8 sec no effect, 9+ works. On slower computers perhaps more is needed. But how to find out WHEN it's really closed, that's the million dollars/euros question...   :dubbio: 
Btw this will help also with another VB bug: if it's restarted fast (under 10 sec), it starts very slow (min) and finally shows an error message about some COMs...

 

LE: link removed, you can find better version in the next posts...



#108 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 24 June 2013 - 04:08 PM

I found a way to detect when VirtualBox closes completely. I already implemented in the code and it will be in the next Beta.

An idea: how about a lock setting? It will lock the drive before dismount and it will unlock it after mount.
By default it will be unchecked.
Pros:
1. This way you can be sure that aren't open handles that are dangerous to terminate (like that swap file);
2. Any attempt to access those dismounted volumes in the host OS will fail (except with VMS), which is good.
Cons:
1. It will refuse to lock the drive even for harmless open handles, which is annoying especially when you close and restart the VM very often.
2. It will add a significant delay between flushing the system data and the dismount (a few sec, sometimes even more...).

What do you think about that...?



#109 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 June 2013 - 07:21 PM

Personally I prefer no locking for the sake of speed. People who play with VMs should know what they are doing....



#110 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 25 June 2013 - 05:11 AM

1.0 Beta 6 version

 

Changes:

 

Improvement: the detection of VirtualBox sessions (manager and/or VM) is now faster and more accurate.
Improvement: found a way to get the exact moment Virtualbox session finishes closing. This way the user will wait only the minimun required amount of time before VMS could safely modify the VB configuration files and start the VirtualBox VM.

 

LE: link removed , better version in the next posts.



#111 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 25 June 2013 - 01:39 PM

I can't think of anything more to improve/fix so this could be the final version...
Well, until Steve will provide some day detailed informations about the error that he mentioned, so I can reproduce it on my computer also and fix it (if it's a bug in VMS, of course)...



#112 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 25 June 2013 - 07:57 PM

Using VM Manager - Create TESTVMS VM with SATA controller and 20GB VHDD (XP)
Close VM Manager
Connect 2 USB Flash drives (+ have internal SSD)
Run VMS and make new entry - select 8GB USB drive as USB 1
Click Start in VMS - get 'Could not automatically add the drive to the VM' error
Start Oracle VManager - select TESTVMS - has only SATA VHDD attached.
Add IDE controller to VM and close VM
Run VMS - same error
Start VM Manager and add in existing self-made USB2.vmdk from C:\Users\Administrator\.VirtualBox\Machines\USB2 Boot
Close VM Manager and start VMS - same error!


Is new BETA 6 broken??



#113 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 02:57 AM

:D

Beta 6 doesn't add the drives to the VM differently from Beta 5. The only difference between them is the code that checks VirtualBox is 100% closed (5 has 10 sec delay, 6 checks if VBoxSVC.exe is closed).
I guess you won't be surprised if I say that I followed your instructions to the letter but failed again to make VMS... fail.

Looks like on your computer VirtualBox closes a little differently...

From the VMS message you forgot to mention the most important part: what is says after "Possible reason:". BTW, the main gold for adding these messages was to help debug these kind of errors...

Other thing you can do to help: install Total Commander, install the task manager plugin, Start VirtualBox, start Total Commander, go to Network Neighborhood, enter its Task manager, search vboxsvc.exe and double click on it and post a screenshot with what shows. If you need to refresh the tasks list, you can do this with F2.
Also you can estimate after how many sec VBoxSVC.exe disappears from the Windows Task manager after VirtualBox is closed.

Thank you.



#114 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 10:37 AM

After you solve with my previous post, you could try this debug version: (LE) link removed
How to use it: start VBM (just the main interface), start VMS, click on Start; it will ask if it should close the VBM; click on OK and wait; it will start the VM, close it. Now it will display a message: write the message here, please.
This version adds another 3 sec delay after VBoxSVCis closed. I'm curious if this will solve the problem.



#115 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 26 June 2013 - 01:11 PM

When trying this new version on the new VM I created I get  (with Vmanager closed)

 

Could not automatically add the drive(s) to the VM in VirtualBox

then

VirtualBx.exe closed in 0.000 sec

VBoxSVC.exe closed in 0.000 sec

 

This is 100% repeatable if VManager is not running.

 

On another occasion after running VManager and the closing it, I got 0.407sec and 6.618 sec  (same error messages).

 

I can run an existing VM that I made in VMS earlier no problem. But the new VM that I made won;t run under VMS!



#116 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 02:12 PM

1. This is a debug version. It has to be started only like I described. Well, so far, you didn't.
2. One more time:
- could you please tell me what it's saying at "possible reason:";
- Other thing you can do to help: install Total Commander, install the task manager plugin, Start VirtualBox, start Total Commander, go to Network Neighborhood, enter its Task manager, search vboxsvc.exe and double click on it and post a screenshot with what shows. If you need to refresh the tasks list, you can do this with F2.
- you can send me the VB files in different stages like I asked a few times;
- you said on PM that you'll explain to me how you use those vmdks's on your computer so I can reproduce the problem, after 3 days I'm still waiting.

So far pretty much all you say it's "VMS it's not working on my computer". But when I'm asking for your help to debug this - something different than just starting the exe - not really...
Well, that's 100% your choice and I have no right to judge your choice but the fact is, without your real help, I can't debug this problem...
I started developing this program only to help others; for me personally it's not that much useful. But if others, for various reasons, cannot help me to debug the problem(s) specific to their computers, there isn't much I can do to solve them...



#117 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 26 June 2013 - 02:39 PM

I am not sure what you mean? I gave you the figures for starting it with VManager open

On another occasion after running VManager and the closing it, I got 0.407sec and 6.618 sec  (same error messages).

Where should I be seeing this 'Possible reason' ???

 

OK sorry _ see it - it says 'unable to find a free port in the storage controller..'

 

The Task Manager plug-in is 32-bit and I can't see a 64-bit one???



#118 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 02:59 PM

OK sorry _ see it - it says 'unable to find a free port in the storage controller..'

 

it says: "unable to find a free port in the storage controller, please free one and try again."

That seem to be a problem with VirtualBox VM, not with VMS. It means that there isn't a free spot/place on the controller where VMS can attach the drive(s).

This also can happen, for example, if you set just a HDD on a SATA controller and the SATA controller has "Port count" also 1. Increase the port count > 1.

But if you are convinced that it's VMS's problem then send me VB's files in different stages...

 

The Task Manager plug-in is 32-bit and I can't see a 64-bit one???

 

The 32bit will work just fine on 64 bit.



#119 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 03:12 PM

Forget the debug version for now.

Solve the storage controller problem in the VirtualBox VM and try again with Beta 6.

If it's still displaying an error message, just post it here (ALL OF IT)... That's why I implemented them...



#120 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 26 June 2013 - 03:17 PM

32-bit TC plugin will not load - it says get the 64-bit version.

 

I had my VHDD on SATA Port 0 - that was all I had in the VM and VMS refused to add in the 2nd VHD.

I changed the VHDD to SATA Port 1 and now VMS works  (it took SATA Port 0)!

 

This is weird because previously I has a test VM and that had VHDD on SATA port 0 and the VMS vmdk attached to the IDE controller with no problems (IDE - PIIX4 - use host I/O cache).

 

Wait - Now I see a Port Count field! It wasn't there before but it has suddenly appeared.

 

I had an IDE controller in the VM and I was expecting VMS to add the vmdk into that...



#121 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 03:37 PM

The 32bit plugin works fine in my Windows 7 x64 (but I'm using TC 32bit not 64bit!):

 

Capture.png

But you don't have to try anymore because it seems the problem is not from VirtualBox closing...

The SATA Controller has Port Count automatically set to the number of storage devices. You have to manually increase it to let VMS add more.
On the other hand the IDE controller always has 4.

VMS doesn't add/remove controller, doesn't change its characteristics and so on. It just tries to add the drive(s) in the free ports in the FIRST controller it founds in the VM.

In conclusion, are there any more problems with Beta 6 or it's all ok now...?



#122 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 26 June 2013 - 03:51 PM

It works OK now, but I think you need to add a Help button to tell people what it does and how to set up a VM

 

i.e.

 

VM Starter

========

VM Starter is a ....

 

How to set up your VM in VBox

======================

IDE controllers have 4 ports, for SATA controllers you can set the Port Count in the VM.

USB 1 and USB 2 will be added to the first available ports on the first disk controller it finds in the VM.

Therefore ensure that you have a free port and that your Port Count is high enough to include your USB drives.

If you want the VM to boot from the USB drive, leave the first port on the first controller free for VMS to add the USB drive:

e.g. leave Primary Master IDE port free if first controller is an IDE HDD,

       leave SATA Port 0 free if first controller is a SATA Controller. 

 

or maybe a ReadMe or PDF with pictures would help?



#123 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 04:17 PM

In a way you're right but: if people hate to read an error message and think about what it mean, who's gonna click and read a pdf/helpfile/readme...?
In my experience I would say - very few...
But I have an idea: how about saying "free stuff if you read 'till end and think about what it mean"? Like "free pot" or "free drinks" :D
Just kidding...



#124 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 June 2013 - 06:59 PM

How about this message set to appear only the first time when the user is trying to set the drive in Add/Edit...?

 

Clipboard01.png



#125 steve6375

steve6375

    Platinum Member

  • Developer
  • 7078 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 26 June 2013 - 07:19 PM

How about adding a web address where the user can go to get the latest version and FAQ/help?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users