Running Android x86 on FreeNAS

Status
Not open for further replies.

larynx

Dabbler
Joined
Jul 8, 2014
Messages
28
I'm looking to use a FreeNAS 11.1 box for Android development. I tried to run Android x86 on bhyve but couldn't get it to work, the only mention I found was a bhyve script to live run it on FreeBSD but not actually install it.

I wanted to try running the Android x86 ISO via Virtualbox on the FreeNAS box but it seems that support for that was removed since I looked into it using FreeNAS 9. Is there a way to setup a Virtualbox jail or does someone have any experience running Android x86 in bhyve?

Thanks
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
You can not run Android in FreeBSD. You MIGHT get what you need from a virtual machine running on bhyve.
Virtualbox jail
jails and Virtualbox are two different things. Virtualbox is like bhyve, its a hypervisor that emulates a whole separate computer. BSD jails are like containers (not linux containers).

What exactly are you expecting to do?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
jails and Virtualbox are two different things.
Well, not really*. Until 9.3.something, IIRC, there was a jail template for Virtualbox, complete with phpVirtualBox. I'll trust that bhyve is a better hypervisor than Virtualbox, but the UX was much better with Virtualbox.

* I mean, yes, they're different things, but Virtualbox is software that can (or at least could) run in a jail--which is what OP asked about. He's asking for a way to run an Android x86 VM on FreeNAS. I don't have an answer for him, but the question is pretty clear.
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I'm looking to use a FreeNAS 11.1 box for Android development. I tried to run Android x86 on bhyve but couldn't get it to work, the only mention I found was a bhyve script to live run it on FreeBSD but not actually install it.

I wanted to try running the Android x86 ISO via Virtualbox on the FreeNAS box but it seems that support for that was removed since I looked into it using FreeNAS 9. Is there a way to setup a Virtualbox jail or does someone have any experience running Android x86 in bhyve?

Thanks

Forget trying to use Vbox on FreeNas 11.1 Can you be clearer as to what you actually did.

This seems to be the latest stable release Android-x86 7.1-r2 (Nougat-x86) and I believe the installer is supposed to support UEFI and grub, hence the bhyve command in the script you referenced used the UEFI boot ROM. Using the webui to create a VM would invoke a similar bhyve command in the background. Is this what you've already tried?
 

larynx

Dabbler
Joined
Jul 8, 2014
Messages
28
Forget trying to use Vbox on FreeNas 11.1 Can you be clearer as to what you actually did.

This seems to be the latest stable release Android-x86 7.1-r2 (Nougat-x86) and I believe the installer is supposed to support UEFI and grub, hence the bhyve command in the script you referenced used the UEFI boot ROM. Using the webui to create a VM would invoke a similar bhyve command in the background. Is this what you've already tried?

I tried to create a new bhyve vm instance using the FreeNAS gui and then mounted the Android 7.1 ISO (from here) as a CDROM device. When I try to reboot I get a boot menu (attached), when I choose either the Live or the Install option the VM crashes after about 1 second so I'm not sure if it's possible to run that ISO on bhyve that's why I asked about Virtualbox.

FT0C0Ig.jpg
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I believe I've seen other threads here, after the Virtualbox jail template went away, about manually creating such a jail. It would be very unsupported, of course.
 

larynx

Dabbler
Joined
Jul 8, 2014
Messages
28
I believe I've seen other threads here, after the Virtualbox jail template went away, about manually creating such a jail. It would be very unsupported, of course.

I wanted to avoid having to manually create the jail if it requires changing any kernel/boot settings since the box is also being used a file server for multiple workstations but if I have to I might resort to that option.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Gave andriod on bhyve a try. Vnc connections just dies during boot. This is the best I could do to capture any on screen messages.

andriod.jpeg


middlewared.log shows this:

Code:
[2018/09/18 16:21:05] (DEBUG) VMService.run():250 - android: 18/09/2018 17:21:05 Using tight encoding for client 192.168.0.114

[2018/09/18 16:21:16] (DEBUG) VMService.run():250 - android: rdmsr to register 0x34 on vcpu 1

[2018/09/18 16:21:20] (DEBUG) VMService.run():250 - android: Unhandled inb 0x03d3 at 0xdf5183b3

[2018/09/18 16:21:20] (DEBUG) VMService.run():250 - android: fbuf frame buffer base: 0x842e00000 [sz 16777216]

[2018/09/18 16:21:20] (DEBUG) VMService.run():250 - android: Waiting for vnc client...

[2018/09/18 16:21:20] (DEBUG) VMService.run():250 - android: XXX vga_port_in_handler() unhandled port 0x3d3

[2018/09/18 16:21:20] (INFO) VMService.run():271 - ===> Error VM: android ID: 29 BHYVE_CODE: -6
[2018/09/18 16:21:20] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: android ID: 29 BHYVE_CODE: -6
[2018/09/18 16:21:20] (DEBUG) VMService.kill_bhyve_web():343 - ==> Killing WEBVNC: 8000



The actual bhyve command invoked was this:

Code:
2018/09/18 16:20:59] (DEBUG) VMService.run():231 - Starting bhyve: bhyve -H -w -c 2 -m 1024 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm29A -l bootrom,/usr
/local/share/uefi-firmware/BHYVE_UEFI.fd -s 29,fbuf,vncserver,tcp=192.168.0.114:5929,w=640,h=480,,wait -s 30,xhci,tablet -s 3,ahci-cd,/mnt/NasPool/home/chris
/android-x86-7.1-r2.iso -s 4,ahci-hd,/dev/zvol/NasPool/VM/android -s 5,virtio-net,tap0,mac=00:a0:98:10:ff:24 29_android


In the gist ref you gave, bhyve was used with a frame buffer (fbuf) device, but not vnc. So I wonder, how was the andriod graphic displayed/accessed?
 

larynx

Dabbler
Joined
Jul 8, 2014
Messages
28
In the gist ref you gave, bhyve was used with a frame buffer (fbuf) device, but not vnc. So I wonder, how was the andriod graphic displayed/accessed?

I miscommunicated that. The gist was the only thing that came up when I searched for running Android on bhyve but I didn't manage to run it. I tried running it with VNC and got the same result you did.
 
Status
Not open for further replies.
Top