VirtualBox last time I checked didn’t properly support Core Profile so the VMWare route should be the safest/easiest to follow - Instructions to do so are provided here and I believe that should still be relevant.
For me developing on a VM would only make sense for smaller scale projects that do not require extensive use of resources and/or fancy GPU side magic. Of course this would also depend on the actual host hardware you are gonna run the VM on, but in any case you are running a ( virtual ) computer inside another system so things can always get a bit off…
That said, installing Linux ( *Ubuntu ) side-by-side on Windows at least ( macOS is another story ) should be really straightforward by creating a separate partition on your disk or even by using a dedicated hard drive just for the Linux OS. The default Ubuntu installer can do this for you as part of the installation process if you already have Windows installed in your machine for example. There are a lot of resources around the net on how you can achieve this so have look on that if you haven’t considered it already.