Andrew Oakley from Cotswold Raspberry Jam wanted to try out the x86 version of Raspbian. However, he wanted to run it inside VirtualBox on his Windows 10 PC to save having to have another machine with just Raspbian running on it. He’s written up the method for doing it on his blog. He does point out the limitation of such a set-up (such as lack of GPIO pins and that it’s running on an x86 processor, not an ARM) but it’s well worth a look if you want to use Raspbian.
Update: From the comments, Andrew Oakley has managed to get the Ryanteck RTk.GPIO working with the VirtualBox install! Take a look at the video below:
Thanks, Mike!
This weekend’s project is to see if I can get GPIO working inside the virtual machine using Ryanteck’s RTk.GPIO add-on, which provides GPIO ports over USB. VirtualBox supports the ability to “take over” a USB port, so it should work.
I’ve done similar things before, to allow a virtual Ubuntu machine to take over my laptop’s real SD card slot.
https://www.virtualbox.org/manual/ch03.html#idm1624
A virtual machine with real-world GPIO ? We’ll see.
Andrew, could you possibly post a tutorial, on your blog, on how you got your virtual Ubuntu to read you laptops SD card slot? Would be very helpful!
Thanks!
RTk.GPIO does indeed work from VirtualBox’s USB feature, as a straight replacement for RPi.GPIO . You simply put RTk.GPIO in your Python code wherever you would normally put RPi.GPIO . However I haven’t yet been able to get GPIOZero nor Pimoroni Blinkt to work – that seems to be more involved than simply a direct replacement. I’ve no doubt that it can be done, though.
Here’s a video of a red & blue LED being controlled via RTk.GPIO in the real world, from Raspbian in the virtual world:
is there a way of installing jessie lite instead of jessie x86 i nthe virtual machine? I want to run docker, but it only seems to work through the lite version through SSH…
Kind Regards,
/Ivan
Hi. Not that I know of, unfortunately. They’d need to do an x86 version of the Lite version.
I think the only way to install something resembling (but not actually) Lite on x86 is to install the full-fat Raspbian and then remove all the GUI stuff. There’s a couple of attempts on t’interwebs, such as:
https://www.reddit.com/r/RetroPie/comments/6r500b/how_to_remove_pixel_desktop/
The main plan of attack is to remove X, and then use autoremove to remove anything that required it. Most likely you’ll still end up with hundreds of megabytes of crud, but it hopefully won’t get called.
Another option is simply to leave the full install as-is, but just don’t start the desktop. It’ll still take up gigs of space on your storage, but it won’t get called. From sudo raspi-config find the preference to boot to console/terminal instead of desktop.
Allright! Thanks for the quick reply. Well then I’ll try my luck with another of the x86 versions running in headless mode 🙂
Best wishes,
/Ivan
I think you also need to ask yourself why you’re specifically wanting to run Raspbian headless, as opposed to Debian or another similar Debian variant. For example, I use Ubuntu Server in Virtualbox for these purposes; being a Debian variant like Raspbian, almost all the commands are identical to Raspbian, and unlike Rasbpian it is designed to run headless (and very happy being virtualised). Bear in mind that you must enable Intel VT-x or AMD-V in the BIOS to run 64-bit operating systems such as Ubuntu 18.04 .
https://www.ubuntu.com/download/server
Hi Andrew
Also thanks to you for a quick and insightful reply. The only reason I wanted to run Raspbian was for using some docker containers from another guy on the pi, since I don’t have my pi with me but still want to try and simulate it in order to test acces to it through an external IP adress without port forwarding: https://jordancrawford.kiwi/home-server-without-portforward/
Anyway I’ll try it without the containers (manual installation) but I’ll also try to install the containers on Ubuntu 🙂
Cheers