Running sikuli on Virtual machine

Asked by Saurabh

Hello,

I have written sikuli scripts using java. And they are running perfectly on Standalone Windows/Mac machine. I bet that will also run on Linux. But I have been trying to run it on virtual machine.
I have tried with WindowsXP installed in VirtualBox and also tried with Ubuntu running on VMWare workstation. In both cases the script is not able to run. It just can't find the target image to click. And just keeps on waiting for the image to appear. The same thing is running in Host machine. But not able to run in Virtual instance of an OS.
Please Help ...

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Saurabh
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

There seem to be many problems in different combinations when trying to run Sikuli inside a virtual machine. The symptoms vary depending on the combination used. (newest report: bug 752065).

I am running Mac OS X 10.6 and use Parallels and Virtual Box.

Parallels/Windows7: IDE shows black screen, but Sikuli basic features (click, find, ...) run, when running a script from commandline. Does not matter which screen mode is used (problems with cursor symbol, highlight() and other minor odds)

V-Box/Ubuntu 10.10 64Bit: IDE and everything else runs fine (using fullscreen mode, did not try windowed)

When having Parallels/Win7 in windowed mode, a script running in host (Mac), works fine: finding and clicking inside the V-Box window is no problem (with the addition, that on Mac you always have to solve the App.focus() problem).

So my guess is, that it is a problem with the native Java interfaces accessing the screen in a virtual environment.

I have already posted a request bug, to get some Java based test tool, that runs some Sikuli related checks and reports problems with the current environment.

Without this it is always a good idea, to check the Sikuli basics using the new interactive commandline feature:

java -jar path-to-siculi-script.jar -i

which opens an interactive Jython session, with Sikuli initialized, so you can just do some tests like:

img = capture()
print find(img)

and other tests, that help to analyze the situation, while getting instant feedback.

Revision history for this message
Tom McGlynn (tmcglynn) said :
#2

Perhaps you need to install VirtualBoxAdditions or VMwareTools? I tried using a script without VBoxAdditions and it didn't work until I installed it. The captured and uncaptured positions of the mouse pointer not match.

Revision history for this message
Saurabh (saurabh-gangarde) said :
#3

Hello,

Thanks for your replies and help. We have been able to resolve the issue and it works fine in VMs now.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

Possible to post some more specific info regarding your solution?

Revision history for this message
Michael A. Phillips (maphilli14) said :
#5

Connecting to the host VM via RDP seems to have helped me.