5

I'm trying to emulate the raspberry pi with a virtualbox using Ubuntu.

I've followed this link and also this one

I've been able to install the requested qemu package, I've downloaded the raspbian image and I've also downloaded the QEMU-Ready Raspberry Pi Kernel.

But when I'm running this command to boot up : qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda name_of_my_img.img

I have this error

WARNING: Image format was not specified for '2016-03-18-raspbian-jessie.img' and probing guessed raw.

After some research, I found this command line qemu-img create -f qcow2 2016-03-18-raspbian-jessie.img 1G to solve the RAW issue

Yet when I'm running my first command to boot , I have the following error

PuTTY X11 proxy: Unsupported authorisation protocol
xcb_connection_has_error() returned true
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4260:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4739:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
kernel-qemu: No such file or directory
qemu: could not load kernel 'kernel-qemu'

If you have any insights, I'm all ears as I'm getting a bit crazy.

2
  • It is well known that versatilepb kernels can not boot Raspberry OS since 2013. You need a variant of qemu which can emulate the Pi instead of Versatile boards (build from source !)
    – flakeshake
    Commented Apr 22, 2016 at 9:36
  • Hi @flakeshake, is there a tutorial out there, which can show me the stuff, please?
    – Andy K
    Commented Apr 22, 2016 at 9:40

2 Answers 2

2

You can run qemu-system (without KVM !) inside Virtualbox - this works fine across architectures. The real problem is that the board emulation "Versatile" can not run "Raspbery Pi" operating systems properly.

Build QEMU from source , it supports the "Raspberry Pi" board.

1
0

One chap on quora gave me the following answer

I've never seen it work that way. You're basically attempting to run a virtualized environment within a virtualized environment. Logically, it doesn't make much sense. And my guess would be that it either won't work, or will cause a crash as the one is attempting to overwrite hardware interrupts of the other. I know running two VM managers side-by-side on the same host is a recipe for disaster as they keep falling over each other's feet. So my guess would be there are similar issues when running one inside another.

At best it would run a lot slower as two virtual environments work layered one on top of another. At worst the host will crash once the secondary VM starts. But by all means, try it and see if it does in fact work ... isn't that one of the reasons one uses such VMs? To try stuff out?

His answer can be found here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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