Running the Qemu image

Yeah, VirtualBox is a strange thing.
I know that Mac OS also is a strange thing. I have tried all day to make a MacOS virtualbox. But I did fail too, after many attempts.

@guru I don’t think that it is just a little thing missing for it to get working.
This can take days/weeks/months to debug. I guess you already know that. I do agree that a hint could be nice.
But I don’t think the time investment is worth it at the moment.

I think the problem with qemu and mouse support would be a easier problem to solve, without knowing anything of the problem.

However the installation of VirtualBox itself should not be that bad in Debian 10:

sudo apt-get update
sudo apt-get upgrade
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add

if add-apt-repository is not already installed, it is in this pakages:

sudo apt install software-properties-common

And then add the repository:

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib"
sudo apt update

I haven’t tested how the converted .img -> .vdi works in VB on Debian. That must be a task for tomorrow.

Well, installing it wasn’t the problem. Installing it successfully turned out to be the hard part - see below. :frowning_face:

Anyway, thanks for the instructions. I made another attempt to install it from the virtualbox.org repository and faced the same errors about kernel headers:

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.16.0-2-amd64

So something is a bit off with my kernel, it seems.

I just realised… you don’t have GL on the display option? My command is as follows, with the image being renamed to PureOS1.qcow2 for version differentiation, and works perfectly with mouse support:

sudo qemu-system-x86_64 -boot menu=on -drive file=PureOS1.qcow2,format=qcow2 -vga virtio -display gtk,gl=on -smp cores=4 -m 3G -enable-kvm -net nic -net user -monitor stdio

Speaking of sliding, phosh does not seem to support it (although the lockscreen does, upon further testing), in case that ends up being confusing. It certainly threw me off at first…

I did as root:

qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -display gtk,gl=on -m 1G -net nic -net user -monitor stdio

(on FreeBSD -enable-kvm isn’t supported, that’s why all is very slow in qemu, it takes minutes to boot)

Same result: no mouse.

I booted the VB and with difficulties I managed to login on tty1 (the problem is that the system jumps back always after 1-3 secs to tty7 where the cursor blinks, so typing is not that easy). I could even fire up there ps ax > file and look into the processes.

How the phosh process is named, to kill it and get a stable bash session to look around?

I started also a thread in the FreeBSD Vbox mailing list
freebsd-emulation@freebsd.org to discuss this issue there…

You should be able to stop phosh with this:

sudo systemctl stop phosh

Yep, this worked and I have now a stable session on any tty1…6.
When I start as root phosh again (to see in the tty1 the errors) it says:

pci id for fd 9: 80ee:beef, driver (null) (process;1229): phoc-wlroots-CRITICAL **: 06:49:41.506: [src/main.c:178] Unable to open wayland socket: No such file or directory
I can restart it with systemctl start phosh and I’m again in the same situation as after boot: black screen on tty7 and system always jumps back to this. On tty1 from where I did the restart are no messages. Where I could find the messages from phosh?

Use journalctl to see this. Something like this:

sudo journalctl -u phosh -xe

I don’t remember the exact options. See the Debugging page for links.

Rhodez-x, can you please post the VB version. I learned in my tests that the system is using wayland server and it looks like that wayland is not supported in my VB version 5.2.22.

So I have some news.

I am using VirtualBox version: “6.0.10 r132055”.
A cording to this forum thread: https://forums.virtualbox.org/viewtopic.php?f=7&t=92133

Wayland has had a bug, which might have been why I could not launch the graphics.
When I tested in my previous post I had version 6.0.3, which had the “Wayland bug”, it is now fixed
in the new release, and the beautiful Phosh is now launching correct.

1 Like

Don’t know if I should mention that i have set the graphics controller to: VMSVGA)

1 Like

does anyone know what the settings are for hearing the sound? I can not make it

I’m trying to see if I can setup an image in gnome boxes. But, I’m not seeing a qcow2 file on https://developer.puri.sm/Librem5/Development_Environment/Boards/qemu.html Am I missing something? I just see the img.xz format. I downloaded that, uncompressed it, and built a gnome box with the img file. But, when I start it, nothing happens. what am I missing?

Is using this approach to develop for L5 still a viable option?

sorry, ignore this post. I figured out my mistake. I had not downloaded an x86-64 image. the qemu boxes does work now, but I’m having the same problem as @guru, no mouse visible?! I’m not seeing a solution in this thread. if anyone else has found a solution, I’d be interested in knowing what it is.

thanks folks!