0

I'm picking up a project that is somewhat out of my depth and expertise so I'll try to lay it out simply. We had a system of sensors that were connected by ethernet to a router, this router had been configured to run a VM of Debian10 that was itself running a python module automatically transmitting the collected sensor data (we could SSH to the router to configure the VM and view data).

I understand how the core components of this work (i.e. the VM was setup in VirtualBox, and putty was used for the SSH) but I'm struggling to understand how it was initialised/built, mainly how would the VM be installed via virtualbox on the router in the first place?

I don't have a router to hand but is it as simple as setting up a SSH and dictating from the command line? The router would be similar in make/model to a RUTX09 (but not that exact model).

For context I'm handling this project as our main systems/coding engineer left, I am unfortunately the most qualified in my team to take this on and my coding experience is mostly data analysis in python.

Edit: Some important information I think I missed; while I can configure the router from my office it will eventually be placed on a vehicle, this vehicle will have a network that we should be able to access via VPN. I have done some digging and come up with the relevant paramters of the original router used: it had 16gb ram, an intel xeon family processor (1.5-2.1Ghz), 1tb SSD.

1
  • 1
    “how would the VM be installed via virtualbox on the router in the first place?”—simply put: Not at all. You should double-check the type of “router” that was in use. Also, why is it no longer in use?
    – Daniel B
    Commented Dec 6, 2022 at 13:44

1 Answer 1

1

I understand how the core components of this work (i.e. the VM was setup in VirtualBox, and putty was used for the SSH) but I'm struggling to understand how it was initialised/built, mainly how would the VM be installed via virtualbox on the router in the first place?

Mostly, it would not. Although the router's OS might be capable of that (if I remember correctly, RutOS is basically OpenWRT so you can indeed just SSH to it and do Linux stuff), the router's hardware is most likely not suitable for running a VM. Enterprise routers (the rack-mounted kind) can run VMs; a RUTX09 is not one of them.

The two general problems are that 1) VirtualBox requires CPU-level virtualization support (which a typical consumer router's CPU usually won't have) and 2) separately from that, VirtualBox is only available for the x86/amd64 CPU architecture (while a typical consumer router is either ARM or more likely MIPS; RUTX09 has "ARM Cortex A7").

VirtualBox is also not very reliable when it comes to setting up VMs to be started as services; it's mostly architectured for interactive use (i.e. on a graphical desktop).

(Linux also has a built-in hypervisor – KVM – which is available for other architectures such as ARM and much more suitable for "headless" use than VirtualBox, but it still requires the CPU to support virtualization natively.)

The last problem is insufficient resources, as RUTX09 only has 256 MB of RAM and the same amount of flash storage, so a standard Debian 11 VM won't fit even if you could run it.

Instead of a VM, a container running your application might work as it doesn't need any special hardware and is much lighter on resources. It should be possible to run a basic container even on OpenWRT.

2
  • I have done some digging and come up with the relevant paramters of the original router used: it had 16gb ram, an intel xeon family processor (1.5-2.1Ghz), 1tb SSD. Would this enable virtualbox? I'll update the question with these parameters.
    – greg
    Commented Dec 6, 2022 at 14:13
  • 1
    Yes, a Xeon CPU can easily run VMs; those parameters are typical for a whole server. So if that's needed for your project, it might be simpler to use a generic server instead of a router (or maybe a generic PC, as a Xeon is somewhat power-hungry and the vehicle might not like powering it). Commented Dec 6, 2022 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .