﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
2530	Timing sensitivity leads to VBoxManage API errors	Terry Ellison		"I have been debugging a build VM script on my dual core AMD 8450e running Ubuntu 8.04-64bit.  I am picking up timing errors when I am calling a sequence of '''VBoxManage''' commands which first set up a VM then adds guest properties.  These errors shouldn't be happening.  Here is an extract from the script:
{{{
VBoxManage -nologo createvm -name $machineName -register

VBoxManage -nologo modifyvm $machineName  \
    -ostype ""linux26"" -memory 512 -vram 1  \
    -acpi on -ioapic off -pae off -hwvirtex on -monitorcount 1  \
    -floppy disabled -sata off -idecontroller PIIX4  \
    -hda none -hdb none -hdd none -dvd none  \
    -nic1 nat -nictype1 Am79C973 -macaddress1 auto -cableconnected1 on -natnet1 default  \
    -nic2 none -nic3 none  -nic4 none  \
    -uart1 off -uart2 off -audio none -clipboard disabled -usb off \
    -vrdp on -vrdpport 4000 -vrdpauthtype external

VBoxManage -nologo guestproperty set $machineName /Startup/Command/1Once \
    ""mount -t vboxsf -o fmode=744,dmode=744,uid=1000,gid=1000 HostCache $cachePath""
}}}
The  guestproperty set command generates the following errors:
{{{
[!] FAILED calling machine->SetGuestPropertyValue(Bstr(pszName), Bstr(pszValue)) at line 167!
[!] Primary RC  = E_ACCESSDENIED (0x80070005) - Access denied
[!] Full error info present: true , basic error info present: true
[!] Result Code = E_ACCESSDENIED (0x80070005) - Access denied
[!] Text        = Virtual machine is not powered up
[!] Component   = Console, Interface: IConsole, {e3c6d4a1-a935-47ca-b16d-f9e9c496e53e}
[!] Callee      = IMachine, {1e509de4-d96c-4f44-8b94-860194f710ac}
}}}

I have a workaround which is to add a '''sleep 10''' between the '''modifyvm''' and the '''guestproperty set''' and then this ""Virtual machine is not powered up"" error does not occur.
"	defect	closed	host support	VirtualBox 2.0.4	fixed	set guestproperty timeout		other	Linux
