1uke_
Posts: 74
Joined: Thu Jul 07, 2016 9:19 pm

Could I virtualise Raspbian instead of buying a new SD card?

Sat May 11, 2019 8:08 pm

Hello,

Background information

I use my raspberry pi as a server to run a number of services on my network.

My normal work flow is as follows
  • Find interesting service that I want to investigate
  • Buy new SD card
  • Research and lean how to install the software
  • Muddle through install instructions until the software works then test the service
  • Decided if I want to continue using the service
Quite often I struggle to install the software but muddle my way through until it is working. Sometimes this can take well over a month.

If I get it working I tend to keep the SD card with the software on just in case I want to go back and use it again at a later date.

However this means I now have a large number of SD cards in my draw as I am worried that I won't remember the install processes.

I'd like to cut down on the number of SD cards I want to buy just to test out service and switch to using virtual machines instead of SD Cards

My Question

Is it / would it be possible to virtualise rasbian on my main desktop computer?

If it is, how would I got about setting up multiple raspbian installs so I can test out different software? (Please consider that I have never used virtual machines before.

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Could I virtualise Raspbian instead of buying a new SD card?

Sat May 11, 2019 8:13 pm

Your requirements seem to have a lot in common with those of forum user @botspot in this recent thread: viewtopic.php?f=63&t=239333

Maybe there is discussion there that might be of interest/value?

LTolledo
Posts: 2153
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Could I virtualise Raspbian instead of buying a new SD card?

Sat May 11, 2019 9:00 pm

Though am not using virtualization, when I want to test out a different setup (before actual deployment), I do backup the (then) microSD cards to a winpc connected external HDD, using Win32DiskImager, naming each image appropriately (setup type, date, etc).

Then flash the microSD card to whatever setup I want, test/tinker with it on the RPi

When its time to revert back, using Etcher, I just flash back the image I want to the microSD card...

So instead of a whole lot of microSD cards, I have an HDD containing libraries of microSD image backups....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

BespokeTech
Posts: 71
Joined: Thu Apr 04, 2019 8:14 pm

Re: Could I virtualise Raspbian instead of buying a new SD card?

Sun May 12, 2019 11:45 am

Virtually all the work I do with my pi's involves the use of the console only, so I use chroot/qemu as explained in this guide https://wiki.debian.org/RaspberryPi/qemu-user-static

Return to “General discussion”