Skip to main content

Virtual Raspberry Pi

Now my computer is set up to run virtual machines (VMs) I should be able to load up a virtual Raspberry Pi and install Home Assistant on that. Correct? Well…hmm, it will be instructive to go through the process, I hope, even if the initial outcome was not was intended.

On opening, right at the top of the VirtualBox (VB) window, there is a large blue starburst symbol with the word New underneath (circled in red above). Clicking this will start a wizard that will help you to create a VM.

The fields of the first dialogue box are pretty self-explanatory; the Name of the VM can be anything you want; the Folder is simply the location where the VM's files will sit; and the ISO Image is the installation disc (or the file version thereof) from which you will boot the operating system. As you can see, I've chosen a Raspberry Pi OS ISO, which is a Linux Type operating system that is actually based on Debian (Version), obtained from the Raspberry Pi website.

At this point eagle-eyed observers, or anybody who's used VirtualBox before, will recognise my mistake here. Instead of choosing a PC-compatible distro (called Raspberry Pi Desktop) I tried to install a 64-bit Raspberry Pi OS. There was a big hint at the bottom (red box) in the blue information quote 'OS type cannot be determined from the selected ISO,…' but I missed it.

This is what it should have looked like.

People commonly don't write up their mistakes and they can be often just as instructive as something done properly. There is nothing worse than sitting there after having followed someone else's set-up protocol and ending up with an error screen with no knowledge of what has gone wrong or what to do to fix it.

So I'll skip the unattended (automatic) installation and follow the manual installation path, as I did with the wrong ISO.

The next dialogue box allows you to set the base memory and number of processors for the virtual machine. In the case of Raspberry Pi, which would normally run on a single processor computer with a reasonably small amount of memory, I chose a single CPU and two GB of base memory.

After this you must set up a virtual hard disc drive for the virtual PC to use. Again, as Raspberry Pi is a lightweight operating system it only needs a small virtual HDD, 20 GB is probably quite large but I didn't know how much space the Home Assistant installation would require. However, unlike a physical hard drive the virtual HDD only takes as much space as the files within it so even though it has a 20 GB capacity it won't use that much footprint on the host PC HDD.

Finally the wizard completes with a summary page.

The next stage is to start the VM, at which point it should install the operating system from the ISO image that you have given it and set up the computer. Unless you've used the wrong ISO that is.

Ah well, the fix was not complicated. It just required me to read the ******* manual and not be a muppet. Replacing the ISO with the correct one for Windows systems solved the issue. In my defense, I wasn't aware that the virtualisation software wasn't virtualising the whole system stack, but I am now.

I won't go through go through the Raspberry Pi OS installation steps, as there are plenty of tutorials out there (here are a couple of examples if you need 1/2), but you should end up with something looking like this.

Finally, the two things we need to know now are, A) how to switch it off and B) how to keep it updated.

To shut the virtual Raspberry Pi machine down hit the raspberry icon and then Shutdown… and follow the instructions.

Keeping the VM updated is a little more involved but not complicated. Press CTRL+ALT+T to open a Terminal window.

Then type in the following,

To get a list of updates, upgrade & reboot

sudo apt update↵

sudo apt full-upgrade↵

sudo reboot↵

To clean up the installation afterwards

sudo apt autoremove↵

sudo apt clean↵

To confirm the installation is working

sudo reboot↵

Et violĂ ! Everything is shipshape. Now on to getting Home Assistant installed.

Comments

Popular posts from this blog

How-to: Setting up a Blogger account with a non-Google e-mail address

As I've set up an e-mail address for the blog it makes sense to be able to post from it too. To do that I will need to set up an account with Blogger for the new e-mail address. At the same time I'll create a gmail account to both manage the blog and give access to the Google apps suite without the monthly fee. Skullcinema@gmail.com is already taken (as there is nothing new under the sun), but I can take a related e-mail address. I won't publish it here as the first address will generate enough spam as it is. Setting up a gmail account really doesn't require a guide, but it is covered here if you need one. So, off to set up an account  through Blogger . First of all though, log out of Google and/or Chrome or it will pull you straight through to Blogger on the account you are logged in on. Choose SIGN IN in the top right-hand corner of the Blogger home page, and then select  Use another account underneath the list of your current Google accounts. Now ...

Getting moving with Grocy

Now we have Grocy working , even if in skeletal form, the next hurdle is to cut the tie to the PC and go mobile. The advantages of being able to update stock levels on the hoof are obvious. All consume and purchase operations can be done at the point of use without the need to make notes and mark these up later. Inventorying can be performed at the storage location rather than dragging everything to the computer or more note making. What is needed, therefore, is mobile access to Grocy via a smartphone or tablet. There are multiple ways to achieve this. Web Browser The first and simplest method is to use the web browser on your device. Although, at least with Android devices, the browser is slightly finnicky about which address it will accept for the Home Assistant (HA) server. Using the standard homeassistant.local:8123 address results in an error message ' This site can't be reached DNS_PROBE_FINISHED_NXDOMAIN. ' There appear to be known problems with Android phones ...

HMRC a-no-go

A few years ago I set up a new company in the UK. The government here has invested quite heavily in digital services so this can be almost entirely completed on-line. You begin the process by notifying Companies House , the venerable UK registrar for companies (for 180 years this year), that you have set up a company. In order for you to do that on-line the Government needs to have some sort of user registration system and one that is a bit more secure than your regular website. Enter the Government Gateway , a government-wide ID system launched in 2001. It was initially designed to be a one-stop-shop that would provide a log-on solution for all of the UK government's on-line services. Whether you were a business/organisation or an individual citizen, with security credentials backed up by GCHQ no less. The Companies House process was exceptionally straightforward and a Government Gateway ID (GG ID) was set up by Companies House for the business. No problems. Another early task...