We are exploring the viability of using VM’s (e.g. VirtualBox) for developers since this is often a best practice in industry, since it provides consistency across developers’ machines and OS’s and saves tedious setup for junior developers. I’ve seen this mentioned in an old post and am wondering if anyone’s doing this, and if so did you run into any issues? Sometimes for example I know that running a VM can result in tricky configuration for networking. Thanks
We’re currently using several eSXI VMs for various purposes on our testbed. I don’t think we’ve tried setting up the gradleRIO/VScode stack on a VM, but we have put Jetpack on a VM for playing with a Jetson, and that works fine.
For development, I don’t think VMs would be worth it. Now that GradleRIO is official, having consistent builds that can be replicated is very easy.
If you pull some code from github and run a ./gradlew build or ./gradle deploy, it should work the same as if it was on any other machine.
Setting up a dev environment is also pretty simple. Just install VSCode and the WPI extension and you’re good to go. Or you can easily import the project into IntelliJ or another IDE that supports gradle.
Agreed. I don’t think using a VM is the best option. If anything your configuration would be MORE robust if you could just run git clone and have a setup script run everything for you.
We utilize VMs for development. We also use containers. I can’t see teaching students how to do what we do without them but what we do is a bit unusual.
VMs enable you to get programmers started faster by cloning them BUT they can quickly get out of sync and depending on the number of programmers you have, the overhead for running them could be more than minimal.
It mostly just depends on your comfort level, number of programmers, and what your goals are. They work well for us though.
I don’t think this is a common practice mostly because if you want consistency you would use docker containers.
I use VirtualBox extensively for work, and naturally also have a VM for all my FRC software. It all works pretty well. As a CSA, I’ve used all four languages across many teams’ robots from within a VM.
That said, I usually VS code directly on Linux to avoid the guest VM bloat. I only really use the VM for the driver station and Rio/Radio imaging utilities.
In general I wouldn’t use Virtual box its super slow and yes you can increase the processor speed but just not a fan. I have heard Hyper V and VMWare are pretty good. I reccomend that if you want to use another OS dual boot.
I have used a Linux Mint VM to for programming with WPILIB, but only because the extensions failed to install Gradle correctly into the project on my Arch Linux Machine.
One other potential use case I can think of is if you share laptops between multiple developers, but don’t have the ability to setup multiple accounts on the machine for some reason (I’ve seen this with School Owned Active Directory managed machines), and want each member to have their own isolated environment.
Beyond these, I don’t see much need to make sure every machine is that identical. The VS Code Extensions seem to do a pretty good job of making sure the project’s resources are isolated from the development machine’s own.