All,

I'm encountering some confusing and challenging behavior from VirtualBox 
when trying to script it. In brief, I'm seeing inconsistent behavior even when
all factors I can control seem to be the same.  I've been seeing this for a 
while, but
today's attempt to update guest additions across all the VMs really
hammered it home. 

We're trying to build some automation around scripting virtualbox, but
I'm not getting results consistent enough to make it reliable. Any
thoughts or suggestions would be welcome. 

Environment: 
* Ubuntu Lucid host, fully updated, running VirtualBox 4.0.6
* A large variety of Windows (XP, Vista, 7-64, 7-x86) guests
Ample disk space and RAM (12 Gb on host, and only 1-2 VMs configured
with 1-2Gb each running during this exercise). 

I started trying to update the guest additions (after having just upgraded
to 4.0.6) with the sanctioned approach:

>From my script: 
echo "Updating Guest additions"
#VBoxManage guestcontrol updateadditions $vm --source 
/usr/share/virtualbox/VBoxGuestAdditions.iso --verbose

That's in the middle of a loop that starts, updates, and shuts down VMs. 

It doesn't work so well, because I get results like this: 

Oracle VM VirtualBox Headless Interface 4.0.6
(C) 2008-2011 Oracle Corporation
All rights reserved.

VRDE server is listening on port xxxx.
Updating Guest additions
Updating Guest Additions of machine "Win7Pro_X86_2010" ...
Using source: /usr/share/virtualbox/VBoxGuestAdditions.iso
0%...10%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Error details:
VBoxManage: error: Guest Additions seem not to be installed or are not ready to 
update yet
VBoxManage: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component 
Guest, interface IGuest, callee 



The progress from 0 to 10 or maybe even 20 or 30, followed by failure, is 
typical. 

So, I decided to handle it a different way: 

Before launching the VMs, I mount the additions with: 
VBoxManage modifyvm $vm --dvd /usr/share/virtualbox/VBoxGuestAdditions.iso

Then I launch the VMs and upgrade the additions with: 
VBoxManage guestcontrol exec $vm "D:\VBoxWindowsAdditions.exe" \
   --arguments=" /reset" --username=xxxxx --password=xxxxx  --wait-for exit

The results are all over the board (Sleeps are in the loops so the systems can
fully boot or completely shutdown before the next machine starts):

Success: 
Starting Build-WinXP_X86_2007_New
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30


Failure: 
Starting WVista_X86_2007
Now sleeping 30
VBoxManage: error: Process could not be started: VERR_IO_NOT_READY.
Updating Guest additions
Shutting down now
Now sleeping 30

Different success: 
Starting Win7HomeBasic_X86_2007
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30

Starting Win7Pro_X64_2003
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30


Different failure: 
Starting Win7Pro_X86_2003
Now sleeping 30
Updating Guest additions
VBoxManage: error: The guest execution service is not ready.
Shutting down now
Now sleeping 30


More success: 

Starting WinXP_X86_2003
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30
Starting WinXP_X86_2010
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30

Starting WinXP_X86_2007
Now sleeping 30
Updating Guest additions
Shutting down now
Now sleeping 30


And more failures: 

Starting Win7Pro_X86_2010
Now sleeping 30
Updating Guest additions
VBoxManage: error: The guest execution service is not ready.
Shutting down now
Now sleeping 30

Starting WVista_X86_2003
Now sleeping 30
Updating Guest additions
VBoxManage: error: The guest execution service is not ready.
Shutting down now


ALL of these results came from a single run of the script to update the guest 
additions. 

I could just do the guest additions manually...but I'm unfortunately seeing 
similarly
unpredictable behavior on other commands too. 

Suggestions or ideas? 
Eric



------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
VBox-users-community mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vbox-users-community

Reply via email to