virtualization on ARM - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 30, 2019, 11:45:39 pm
content: I have a Nook HD plugged into a Raspberry Pi 3 for mining Swagbucks, the Nook doing the actual mining and the Pi running a script to supervise the mining. Since the setup uses little power, I haven't given much thought about it until recently. I decided to share the script in the hopes that other makers will be able to use it to help Becky Button, but because there are so many Android devices out there, the script will require tweaking in order to work with whatever old devices makers have lying around. (https://www.eevblog.com/forum/chat/help-out-becky-button-with-a-massive-distributed-array-of-low-power-computers/)Then I realized that a Pi 3 has plenty of CPU to be able to virtualize a "standard" Android tablet, and since the Pi is ARM to begin with, there won't be a huge emulation overhead that an Android VM on a PC would have. Or at least that's my understanding. Modern x86 CPUs have hardware features to enable them to virtualize x86 environments with only a slight performance loss. Do the kind of ARM cores found in popular single board computers have an equivalent, and if so, how to use it?I don't think it's likely I'll invest any real effort into a "Swagbucks mining appliance" image for the Pi, but maybe if it's possible, someone else will be interested. Helping a maker in need using the most popular low cost computer would be quite noteworthy.

author: magic
author_rank: Super Contributor
timestamp: August 10, 2019, 07:28:13 am
content: qemu may (or may not) have sufficient performance even without HW virtualization if it's the same architecture and the code is mostly userspace.HW virt exists on some new ARM cores but I have no idea how widespread it is. Supposedly Linux supports it in KVM.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 10, 2019, 09:12:08 pm
content: Some discussions of virtualization on Raspberry Pi:https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546https://www.raspberrypi.org/forums/viewtopic.php?t=232796Interesting that one of the key developers behind virtualization on Raspberry Pi is a woman. I'm sure she'll be happy if the first widespread application of her work is for helping another maker woman.I used to mine Swagbucks in a VM running on my PC, back when the difficulty was low enough that it was still profitable after the emulation overhead. Then as the difficulty went up, it got to the point where it made more sense to use an Android tablet even though that meant having one less device for mining other altcoins with.I don't really have the time to work on making it straightforward to mine Swagbucks on a Raspberry Pi, but I'm hoping some other maker finds interest in doing so.

author: edavid
author_rank: Super Contributor
timestamp: August 10, 2019, 10:52:37 pm
content: What is the point of running the miner in a VM? Why can't it just be a process on the native OS?

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 10, 2019, 11:41:18 pm
content: Last I checked, native Android on the Pi is not very well supported, apparently the drivers aren't designed for it. Virtualization is one way around that problem. As for hacking the Swagbucks miner to run native on Raspbian, it would involve a lot of low level hacking - they didn't want to make it easy for someone to embed the miner in some other app.One problem with just using a $10 phone, besides availability, is that developers have surprisingly little interest in rooting them. They rather spend the same time hacking a $50-100 phone and end up with a much better device. Also, the Raspberry Pi is the most popular "standardized" ARM platform that makers are likely to have lying around.