Page 1 of 1

Can i load my loaded rasp pi SD card into a virtual machine?

Posted: Fri Jun 22, 2012 5:22 pm
by capslock118
I'm sure this has been asked plenty of times but my search technique is not turning anything up.

I'm using QEMU right now without issue when using .img files.

Is it possible though, to load an SD card with a rasp pi OS (the way I am suppose to for using with the rasp pi) and then use that SD card / OS in a virtual machine?

I'm not sure on the benefits of doing this, I am just curious if that can be done.

Re: Can i load my loaded rasp pi SD card into a virtual mach

Posted: Fri Jun 22, 2012 6:01 pm
by Joe Schmoe
It should work, but the obvious question is:

What happened when you tried it?

Re: Can i load my loaded rasp pi SD card into a virtual mach

Posted: Fri Jun 22, 2012 6:14 pm
by JeremyF
You can't boot a virtualbox machine with it (x86 vs. ARM) but you could still see it and modify the partitions, etc.

Re: Can i load my loaded rasp pi SD card into a virtual mach

Posted: Fri Jun 22, 2012 6:31 pm
by capslock118
Hi Joe,

I am trying right now with QEMU but my knowledge of these things (lack thereof) is proving to be a barrier to entry.

JeremyF, I think it was my wording that was poor here. I know that an x86 virtualbox, VMware, parallels, etc etc etc will not run an ARM operating system. That's why I mentioned QEMU. I was more asking about, conceptually, if QEMU or something similar could run not off an image but off an SD card that is set to load right into a PI.

and not boot from the sd card (if that was even possible on an x86) but into a virtual like environment.

Re: Can i load my loaded rasp pi SD card into a virtual mach

Posted: Fri Jun 22, 2012 6:35 pm
by Joe Schmoe
capslock118 wrote:Hi Joe,

I am trying right now with QEMU but my knowledge of these things (lack thereof) is proving to be a barrier to entry.

JeremyF, I think it was my wording that was poor here. I know that an x86 virtualbox, VMware, parallels, etc etc etc will not run an ARM operating system. That's why I mentioned QEMU. I was more asking about, conceptually, if QEMU or something similar could run not off an image but off an SD card that is set to load right into a PI.

and not boot from the sd card (if that was even possible on an x86) but into a virtual like environment.
Yeah, the tricky part is getting the virtual machine to "see" the physical hardware (the SD card reader). VMWare provides a way to do this (for USB devices); I assume VBox (which I've never used) does something similar. I think QEMU does, but a) I've never done it and don't know the details and b) I get the impression it isn't very well developed - certainly not as well as in VMWare.

Re: Can i load my loaded rasp pi SD card into a virtual mach

Posted: Fri Jun 22, 2012 6:40 pm
by ghans
AFAIK qemu-arm lets you specify a zImage + initramfs , so you skip the Broadcom bootloader from the first partition. Then you should be able to specify the other partitions as hda and hdb.

I may have a look into manpages and commandline options and report back.