Problem With VBoxManage Command running form Jenkin Slave

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ifti
Posts: 3
Joined: 20. Feb 2013, 08:31

Problem With VBoxManage Command running form Jenkin Slave

Post by ifti »

Hi,

I'm in a critical situation. I'm explaining my problem below. Please have a look on it and suggest me how to get rid of it.

In My windows 7 machine I have installed cygwin and virtual box.
I'm trying to use this machine as a jenkin slave.

In this machine I have a script file which will be run by the Jenkin Slave.
The script file is complex , it perform lots of task. But every task is working perfectly. But in the Script file I have a command

Code: Select all

VBoxManage list vms
. Which is not running perfectly.
I'm getting the following error when Jenkin Slave is trying to run the script -

Code: Select all

VBoxManage list vms
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.
Build step 'Execute shell' marked build as failure
But I have tried to run the VBoxManage Command from my machine using CygWin console and its work pefectly.
I have also tried to connect to the machine from another machine using ssh connection and from there I ran the script file without any problem.

It happens when Jenking is trying to run the script file through Jenking Slave.

Someone please guide me how to sovle the issue.
I have setted VBoxManage in my Sysem Path also.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Problem With VBoxManage Command running form Jenkin Slav

Post by noteirak »

Is the user under which you run the scrip the same as the user who created the VMs? or do you expect an empty list of VM?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
ifti
Posts: 3
Joined: 20. Feb 2013, 08:31

Re: Problem With VBoxManage Command running form Jenkin Slav

Post by ifti »

Hi Noteirak,

Thanks for your quick reply.
You are right. In both case I used the same user.

But suppose, I don't have any VM at all . Still I want to run the command

Code: Select all

VBoxManage list vms
command.
And it will return an empty List.

But when I'm running that command from jenkins I got the error.
Jenkins using the same user which I used for login in to the slave machine. (And the user is Admin user.)
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Problem With VBoxManage Command running form Jenkin Slav

Post by noteirak »

I have to say, I don't know what Jenkin Slave requirements or limitations are.
What do you get when you run the command in a command prompt as a normal user?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
ifti
Posts: 3
Joined: 20. Feb 2013, 08:31

Re: Problem With VBoxManage Command running form Jenkin Slav

Post by ifti »

Problem Solved. I need to change the permission -
Here is the detail instruction for this ---

http://pic.dhe.ibm.com/infocenter/wxdin ... shwin.html
Post Reply