User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Wed Apr 15, 2015 1:07 am

cmickc wrote:Hi there,

Sorry for what may be a stupid question, but after i setup Qemu and have an rpi vm running in it, how do i then deploy this built VM onto an SD card to run on an actual rpi?

You could try and burn the img file to the SD card, but the image is probably heavily customized to work on qemu, not a real raspberry pi, so I'm not sure how well it would work.
There are 10 types of people: those who understand binary and those who don't.

TheQuestor
Posts: 80
Joined: Wed Nov 28, 2012 9:15 am

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Wed Apr 15, 2015 1:54 am

Or you could use a backup app or dd to create a working image of the virtual machine's/chrooted drive and just dd or win32diskimager write it back to a sdcard .
You may have to putz with the bootload and or some etc entries for hardware but it has been minor for me in the past as long as the vm/chroot was from a working Pi.

shruti
Posts: 1
Joined: Tue Aug 25, 2015 5:52 pm

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Tue Aug 25, 2015 5:56 pm

URGENT
I am not getting how to get the Linux kernel for Qemu.

Code: Select all

PC:~/qemu_vms$  qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda ~/qemu_vms/2015-05-05-raspbian-wheezy.img -redir tcp:5022::22
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
kernel-qemu: No such file or directory
qemu: could not load kernel 'kernel-qemu'
[/i]
:?: :?: :?: :?: :?: :?: :?:
---------------------------------------
These were the errors I got please guide me, as you can see I am yet a newbie.

mpeters
Posts: 3
Joined: Sat Nov 28, 2015 4:00 pm

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Sun Nov 29, 2015 4:36 pm

I am confused because i do understand how to get the sector size for the file. Does anyone have any idea how to get the sector

file [file]

does that not give sector start and end sizes....

mpeters
Posts: 3
Joined: Sat Nov 28, 2015 4:00 pm

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Sun Nov 29, 2015 11:50 pm

viewtopic.php?f=63&t=28860 for anyone who wants to know how to mount the file and modify you must do they file checks for the sectors using root account... regular account wont give you anything and rename the kernel to the file name qemu-kernel... according to the command written... also https://github.com/dhruvvyas90/qemu-rpi-kernel you can get jessie kernel from there... what a day

pierre123
Posts: 13
Joined: Tue Feb 28, 2017 1:15 pm

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Thu Mar 16, 2017 10:56 am

Hi,
It was said in the first post :
"It's a pretend Raspberry Pi, running completely in software, on your desktop, that you can use as if it is a real one (minus the ports and GPIO obviously)."

Does it mean that you can not interract with a usb device or an ethernet cable?
Thank you!

pierre123
Posts: 13
Joined: Tue Feb 28, 2017 1:15 pm

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Tue Mar 21, 2017 11:08 am

Hello,
there is something I do not understand in qemu :
Why do you need a kernel AND a distribution image?
The distribution image would not be enough?
Thank you!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10

Tue Mar 21, 2017 11:12 am

qemu doesn't know how to boot that kernel and if it did, it would still be for the wrong hardware. The raspberry pi firmware loads the kernel, but qemu does not emulate the firmware. Last time I checked, qemu didn't have a real raspberry pi -M option, so the hardware is emulates does not match. By using a different kernel, you make sure that the kernel supports the hardware provided by qemu.

Return to “Advanced users”