Jump to content











Photo
* * * * * 3 votes

Virtual Machine USB Boot

boot usb machine virtual

  • Please log in to reply
175 replies to this topic

#26 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 01 September 2013 - 11:44 AM

New version: 1.25 Beta 1

What's changed:

- after checking the "Show a second drive" option, adding or editing a Qemu entry was problematic because the exe parameters edit area was too low positioned on window; also Qemu was not recognizing the second drive and refused to start. Both problems solved.
- most info/warning/error messages appear now in the middle of their parent window instead of the middle of the screen;
- the texts of some messages are improved to help the user more;
- each new entry will have "USB Boot test" as the default name but it will be selected so it can be easily changed;
- a few internal functions are optimized (faster and less CPU usage);
- the automatic search for the Qemu exe path is slightly improved;
- in Options:
- the "Lock the volumes ..." option is now checked by default when the application is freshly installed or when you delete the cfg file from the portable version;
- added "Backup the old entries before saving the new ones" option, checked by default; if you uncheck it, it will not save the old entries as *.vml.bak anymore. It is useful when you don't add/edit/delete entries often or you are sure there will be no problems during the save operation (for example OS, drive and/or electricity problems);
- added "Don't warn when not able to save the configuration or the entries file (read only medium)" option, unchecked by default; useful when you start the portable version with a fixed configuration and with fixed entry/es from a read-only medium or with 0% free space (CD, DVD, write-protected USB key/flash/stick, USB key/flash/stick filled with dummy files to prevent virus infection);
- the length of the text for all options is limited to reasonable values to prevent "buffer overflow/overrun" problems;
- in the previous version when pressing F1 was directly loading "http://reboot.pro/to...chine-usb-boot/" in the default internet browser; also the last items from the context menu of the caption from the main window were directly loading their internet links. Now first checks for an internet connection, then tries if the default link works and, if not, tries a backup one. For example, the backup for F1 is "http://reboot.pro/in...showtopic=18736". If one of them works then it will be started in the default internet browser.

Edited: links removed, you can find a better version in the next posts...



#27 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 03 September 2013 - 06:31 AM

I reported the "physical disk" bug directly to the Qemu developers (at wiki.qemu.org) a while ago. They recently said that the problem was localized only to the Windows version of Qemu and it should be fixed now in the 1.6.0 version...

I'm thinking about adding a few more predefined "command lines" for Qemu instead of just one. For example for VM's <> x86/x64. The user will choose each one with a checkbox in the Add/Edit window.
What do you think, guys, will it be useful...?



#28 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 03 September 2013 - 04:35 PM

New version: 1.25 Beta 2

Changes:
- when "use VBoxManage.exe command line (slower)" option is checked, VMUB waited about 5 sec so the previous VM session would be fully closed. For those of you who doesn't know why is it doing this: when you close and restart VirtualBox very fast, sometimes is crashing (VirtualBox bug). Those 5 sec may be too less on some systems or too much on other. So I found a way to check if its closed so it will only wait the amount of time that it needs. More, now it will show a progress window where you can see how it goes and where you can even stop the waiting (well, at your own risk).

Edited: links removed, you can find a better version in the next posts...



#29 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 05 September 2013 - 01:39 AM

1.25 final version released.

 

Click here to download this file

Changes from Beta 2: a small bug in the newly added code was fixed.

Since not every user needs the sources of this program, they were not included in the main download anymore.
But you can download them from this link: (link removed, newer version in the next posts)



#30 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 294 posts
  •  
    Germany

Posted 05 September 2013 - 09:07 AM

thaaank you ! :1st:  *jump* :clap:  :good:

best regards

Blacky



#31 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 08 September 2013 - 07:13 AM

VirtualBox 4.2.18 released 2 days ago.

It's strange that it was released so close after VMUB 1.25. But it's probably just a coincidence...

It's also strange that lately the update checker from VirtualBox Manager doesn't announce me about the new versions as soon as they are released. More, even if I try the main menu Help >> Check for updates still doesn't show a new version.
On your computers does it "behave" the same way..? If yes, they should fix it. If not, it's probably just another coincidence that it happened only on my computer (so many times)...

Prior releasing VMUB 1.25 I tested it thoroughly with VB 4.2.16 and with 4.3.0 Beta 1. All was fine.
It's again strange they suddenly decided to release VB 4.2.18 final even if the official Beta version was 4.3.0 Beta 1. But, again, that's probably just a coincidence.

Anyway, it seems that 4.2.18 has sometimes problems with the "storageattach" command, failing to detach the vmdk.
For those of you who doesn't know, there is no detach command; "VBoxManage.exe storageattach [GUID_of_the_VM] --storagectl IDE/SATA --port [n] --device [n] --medium none" command is used to set the medium to none.
The problem appears when the USB drive is changed with another but having the same "physical drive number" as the previous.
I will further investigate and come back with the results.

BTW, this problem doesn't appear when you use "Method to update.. >> directly" in Options, because this way it doesn't use vboxmanage commands. So, if you have VB 4.2.18 and often change the USB drive, I advice you to use the "directly" method for the time being.



#32 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 294 posts
  •  
    Germany

Posted 09 September 2013 - 06:36 AM

humm.. maby have anyone with anyone an deal for not adding some fiture like you VMS share it ..
i bet was befor some jears possible.. but.. anyone whant not to be an System on USB ...
for foreign booting with an usb-stick, take a look if have some Spy this possibility and can
boot an Mashin foreign have he full access with an USB-Boot possibility like an usb-Disk os an usb-stick ...
but.... usb3 it is come anyway and it is 3times faster as sata .. or something.. so..
usb-boot it is come in anyway.. so.. then why not grab befor and create like you an
possibility for create an bootable usb or usb-harddisk bootable with an System .. i am not correct ? or i be wrong ?
 
They peoples be really dumb if they not include it.. and they not include it , you have greate some possible now :)
now they are in tight spot ..  .. and to the others.. we are should spread this lil nice programm in all Freeware-Forums ..
 
best regards
Blacky
 
p.s.: postet on essential-freebies.de



#33 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 10 September 2013 - 06:03 AM

Thank you Blackcrack.

Well, I came to the conclusion that the problem is not from my application and there isn't much I can do to avoid it.
When vboxmanage.exe is called many times at some point it will refuse to do the job. It will wait 30 seconds and it will autoclose with exit code 1. It resembles somehow with the VirtualBox fast restart problem.
The problem exists in all VirtualBox versions but in those <> 4.2.18 it was, let's say, on an acceptable level. In 4.2.18 it does it more often...
When it works properly each job is done in about half a second. So I implemented a "waiting time to finish" of 15 seconds for each of them, which is enough even on slow computers.
It's a little strange that they decided to set the autoclose time to 30 seconds. But, what is even more strange, the problem appears ONLY when vboxmanage.exe is called by another exe, not when it's started directly or from a batch file.



#34 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 294 posts
  •  
    Germany

Posted 10 September 2013 - 06:50 AM

humm, maby the the type of call, in einer batchdatei via cmd and the one from the compiled programm

in an other orogramming language.. look.. the command.com was writing in c and the cmd.exe like i know in c++

and the batchfiles make not other for tell the cmd, call/start the programm, now we look on the programming language,

how the hack it is call an other executable file in an other programminglanguage ?

This it is the question like (like Juliet&Romeo) but both use an other language , you see..

Juliet speak Esperanto and Romeo Italiano .. but both loves, but dont relay understands..

maybe something like that .. both can kiss together, but can not really understand..

and on longer sight ... gives truble *bg* is an funny comparison maybe, but ....

 

We should have someone who can read the code from virtualbox (because it's open Source)

for review and check out what's directly the problem .. so we need an Programmer who can be an helping hand..

and i think, on this point want be go very interresting ..

 

best regards

Blacky



#35 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 10 September 2013 - 07:36 AM

It could be from Delphi <> C/C++ but I doubt it.

I'm using this Winapi function to start any exe: CreateProcessW

I never had problems starting any other exe with it...

 

And even for a experienced C/C++ programmer it's not that easy to find the problem in so many pages of VirtualBox code...



#36 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 294 posts
  •  
    Germany

Posted 10 September 2013 - 08:44 AM

therefore i like nsa *bG* you see.. hihi ... humm.. therefor shold it really examine the code in individual 's ,

for really knowing why it works well there and not well there ..

 

best regards

Blacky



#37 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 11 September 2013 - 06:13 AM

Well, the only good thing is that the problem appears when you restart VMUB a few times (fast) and start the VirtualBox VM as fast as possible. Or when you change the USB drive a few times very fast and click on Start button each time. This way you'll force VMUB to call vboxmanage.exe many times in a short amount of time and it will increase the chances that something would go wrong. But the regular users don't do that very often...
Anyway I advice you to use the "method to update.. >> directly" in Options and use the vboxmanage method only when is really necessary.



#38 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 23 September 2013 - 04:55 PM

Looks like in the latest Qemu version (compiled on 2013/09/21) the problem with the PhysicalDrive parameter is solved.
It can be downloaded from here



#39 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 26 September 2013 - 08:17 AM

New version: 1.26 Beta 1

Changes:

1. In Options: <<Add "Enable VT-x/AMD-V" option to the Add/Edit window">> in VirtualBox section.
When it's checked it will add this option to the Add and Edit windows, with 4 states: Unchanged (default, it will not change the state of the option in the VirtualBox VM), On, Off and Switch. Switch will change the state (On to Off or Off to On) every time you (re)start the VM.
2. Some minor adjustments for VirtualBox 4.3.0 Beta 3.

 

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



#40 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 01 October 2013 - 10:13 PM

New version: 1.26 Beta 2

Changes:
- for Qemu VMs now you can easily set a HDD image file as the internal HDD, memory size and a sound card (in the previous version(s) they could be set only with exe parameters).

 

Clipboard01.png

 

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



#41 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 04 October 2013 - 10:11 AM

New version: 1.26 final.

 

Changes (from Beta 2):

 

1. The Memory edit box from the Add/Edit window (Qemu VM) was changed to a spin edit box.
2. Small improvements to the way the application handles the input errors (from the user and VirtualBox configuration files).

 

Click here to download this file

 

Sources: Attached File  VMUB 1.26 sources.zip   250.95KB   354 downloads



#42 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 16 October 2013 - 02:19 AM

VirtualBox 4.3.0 was released, with a lot of improvements and bug fixes.
Unfortunately the VBoxManage.exe problem doesn't seem to be fixed, although it was reported some time ago...
And because the new version is slower (~ 2x) in closing its dependencies when the GUI is closed, looks like VMUB will have to wait a longer period of time to be fully closed. But this will affect the starting time only if the VM is (re)started right after closing it.



#43 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 294 posts
  •  
    Germany

Posted 16 October 2013 - 04:01 AM

i think, it's not so bad, because, the possible exist for take an USB-Device and installing an System on it.

and if some start slower by restart it's not so important, the main thing is, it is possible to make the most important ..

and it is exist the possible :)

DavidB, i bet with you, 5-7 years ago it would have been possible as USB boot to add to the VBOX,

but one (an anonym person/?s) want not, for add this gimmik into the VBox.

And i think, it's the same reason why the VBoxManage.exe bug not be fix it ..

but it was able in this time to fix it .. like you have say it to was able ..(and into the new 4.3 version also)

How ever.. i see positive in the future, we have the new USB3 Standart and this Fiture

mus comming in anyway ;)

 

you have Show to be it is works on usb for using with an System and the download-numbers it prove that it is used.


  • Submitted: Jul 20 2013 08:01 PM
  • Last Updated: A week ago
  • File Size: 1.62MB
  • Views: 7302
  • Downloads: 4,793

 

best regards

Blacky



#44 sebretos

sebretos
  • Members
  • 1 posts
  •  
    Indonesia

Posted 21 October 2013 - 09:53 PM

Hi DavidB, im jut starting to use Virtual Box 4.3 on my windows 7.

i want to try install another windows 7 by using USB boot for my lesson so i read your tutorial

 

i  tried your tutorial step by step :

-> set administrator in USB bot 1.26

-> set administrator in VB manager

-> make sure storage port available

but it keeps telling error message "disk error.... press any key o restart"

any idea what i missed from this steps?

 

need help so much for this topic.. thanks before



#45 steve6375

steve6375

    Platinum Member

  • Developer
  • 6405 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 21 October 2013 - 10:04 PM

Is the first disk storage port free?



#46 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 21 October 2013 - 10:12 PM

Hi.

If VMUB is saying that then it could be a problem with VMUB. But I haven't implemented this error message...

But if VirtualBox is saying it, it could be a faulty MBR or even a VirtualBox virtualization bug. For example it said that when I used WinToFlash + Windows XP SP3 onto  my USB flash/stick.

So, are you seeing the message in a small "message box" or in the VirtualBox VM window...?

 

 

Later edit:

 

For example, this is what I see when I try to boot from my USB key/flash/stick after I used WinToFlash to add Windows XP SP3 on it:

VirtualBox.png

It seems to be a virtualization bug...



#47 cardex88

cardex88
  • Members
  • 5 posts
  •  
    Indonesia

Posted 25 October 2013 - 06:11 AM

hello DavidB,

 

i've some troubleshoot when running virtual machine usb boot with virtual box. can you point me out step by step?

 

here the screenshot of the error :

 

Spoiler

i would appreciate your help.

 

thx before.

 

regards

 

cardex88

 



#48 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 25 October 2013 - 07:20 AM

The USB key/flash/stick is seen as a HDD when booting from a real or virtual computer.
In most real computers you can select HDD boot order in Bios. Unfortunately in VirtualBox VM there isn't such an option.
So you'll have to go into the VirtualBox's storage controller and set the HDD(s) from there (except VMUB***.vmdk, if you see one) to subsequent port(s). This way the VM will see the USB drive as the first HDD and it will boot from it.
I could of explained how to do that in that message you've seen and/or in the VMUB presentation. I have chosen not to because this is a very important computer and VirtualBox knowledge and the best way to understand it is to search and solve it yourself, not just blindly follow my step by step instructions.
In that message and in this one I have already gave you some pointers on how to (easily) solve it.
But, since this is a forum where people are helped, if you (still) just want the step by step instructions, of course I'll help you with that.
Just let me know...



#49 cardex88

cardex88
  • Members
  • 5 posts
  •  
    Indonesia

Posted 29 October 2013 - 08:04 AM

i'd love to if you can give me step by step instructions. i'm newbie in virtualization things. :D i'm trying figure it out by myself but i'm still stuck, cause i not familiar with the function of the menus in virtualbox.

 

thx for your fast respond Davidb. i appreciate it.



#50 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 29 October 2013 - 09:25 AM

Start Oracle VM VirtualBox Manager. In the left panel select the VM used for USB Boot. In the right panel click on Storage (with the blue HDD icon).
Any drive you see here (except VMUB***.vmdk) select it and look at Attributes in the right side. In the combobox (dropdown) you'll see the assigned port. Change it to a subsequent value; for example from IDE Primary Master to IDE Primary Slave or from SATA Port 0 to SATA Port 1.
The idea is to free IDE Primary Master or SATA Port 0 for the USB drive...
If you see a VMUB***.vmdk, assign the IDE Primary Master or SATA Port 0 to it.
Click on OK, close Oracle VM VirtualBox Manager, wait a few seconds and start the VMUB.

If still you can't set it, please post a screenshot of those Storage options...







Also tagged with one or more of these keywords: boot, usb, machine, virtual

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users