Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am considering using a Raspberry Pi in a simple project. It should run some small Java (preferably) or Python console application, in its essence a very simple server. I know this will not be a problem for it and what I have to do is just install a Linux distro and add a Java package (which seems a little fiddly but much easier with Java 8).

What I would like to know is could this be done on an image of an SD card using some virtual machine on a Windows PC? Basically I want to set up the OS, install packages and set up my program to run on boot (and probably enable SSH), and only then write that virtual image to an SD card and insert it into the Pi to use it. What programs would I need to accomplish this, and are there some tutorials? Also I will probably use this same image on 2 or 3 Raspberry Pis later.

share|improve this question
    
What has your research on running an ARM/Linux distro proven? I am not aware of a solution that would allow that? You can boot Debian ( same distro that comes with the RPi ) to get an idea how it will work. –  Ramhound Sep 11 '13 at 14:17
    
For my requirements any distro could be used and I will probably use the Debian suggested on the Pi Website. Basically the only parts I don't know how to do are: how to run ARM image in a Virtual Machine on a PC and how to save that image after installing software and setting it up in correct format for the PI. –  PSIXO Sep 11 '13 at 14:32
    
I take it you have tried QEMU. What problems are you seeing? –  Chenmunka Sep 11 '13 at 14:32
    
The only solution to this idea I have seen is QEMU. That being said, in my experience it was buggy and gave you limited storage space (solutions on their page). I would personally write the Java code on your box and then move it over (scp). You know, since Java is supposed to be portable. –  nerdwaller Sep 11 '13 at 14:33
    
I heard of QEMU but haven't used it yet so didn't have a clue that it could be used to emulate Raspberry Pi so if it works that is probably an answer to the first part of the question. I am going to test it right now. –  PSIXO Sep 11 '13 at 14:36

1 Answer 1

up vote 1 down vote accepted

The most solid solution that I have seen for this is QEMU. That being said, in my experience it was somewhat buggy and provided little in the way of storage space (note: there is a solution on their page now, though I cannot vouch for it).

Personally, I would write the Java code locally (on my normal computer) and move it over - since Java is supposed to be nearly infinitely portable.

share|improve this answer
    
I abandoned Java in favor of a little bit more complex Bash scripts. Although I did get Java to work without a problem. QEMU is the right way to emulate the Pi on windows so this is the correct answer.PS.Yes it is a little bit buggy but nothing critical, even the default networking setup works great. –  PSIXO Sep 26 '13 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.