capslock118
Posts: 43
Joined: Wed Mar 21, 2012 6:25 pm
Location: New Haven, CT
Contact: Website

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

Fri Jun 22, 2012 5:22 pm

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.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Fri Jun 22, 2012 6:01 pm

It should work, but the obvious question is:

What happened when you tried it?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
Contact: Website

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

Fri Jun 22, 2012 6:14 pm

You can't boot a virtualbox machine with it (x86 vs. ARM) but you could still see it and modify the partitions, etc.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

capslock118
Posts: 43
Joined: Wed Mar 21, 2012 6:25 pm
Location: New Haven, CT
Contact: Website

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

Fri Jun 22, 2012 6:31 pm

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.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Fri Jun 22, 2012 6:35 pm

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.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

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

Fri Jun 22, 2012 6:40 pm

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.
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “General discussion”