Virtual machine for separate projects?

I remember Chris saying that he splits up customer projects into separate VMs. I was wondering if there were any good resources on how to get started, how to set something like that up.

I was actually just cloning a machine!

I use VMware Workstation 16 Pro. The setup on there is pretty easy. Basically once you install the base software (by VMware), you can install an OS on top of that. Here’s a video of someone installing Ubuntu 20.04 on top of VMware player 15:

Awesome, thanks for pointing me in the right direction!

btw, it looks like VMWare Pro is on sale for ‘Cyber week’ %25 off right now

Is VMWare Pro much better than Virtualbox? I am willing to pay for a good product, but I can’t figure out what the difference is between the two.

Main problem with VirtualBox is the license. If you plan to use USB you have to install their extensions and they are strictly for non-commercial use.

https://www.virtualbox.org/wiki/Licensing_FAQ

Yep, I just took advantage of that. Happy to pay for the tool.

One thing that I figure with using a true VM (instead of a containerized machine) is that the UI is a big element of it, for better or worse. As such, I expect it to act much like the host machine in that it doesn’t bog down when I open a web page in that machine, or run a graphing program, or instance of KiCad, or whatever is needed within the VM. I have found in my limited experience that VMware runs much better in this regard, in part due to VirtualBox having video memory limits. It’s been a while since I ran VirtualBox, so that may have been lifted, but I was always underwhelmed with the machine via VB.

Thanks @alvaro and @ChrisGammell ! That’s really useful information - I was just taking a look at the KiCad.info forum for experiences using KiCad in a VM. Looks like VMWare is the way to go!

I do this for a lot of my projects - it saves cluttering up my desktop PC with a dozen (sometimes incompatible) versions of the same tool.

If you have a Windows-only tool, you can obtain unlimited Windows licences (even for 7 or XP for really old tools) by purchasing an annual Visual Studio Subscription - the subscriber benefits include a licence to run any Microsoft software for development purposes. Note that this subscriber benefit isn’t included in the monthly Cloud Subscription, only the annual subscription.

Good to know about the Visual Studio.

I just tend to buy separate copy of Windows from these aftermarket places - cost around $30 or less for a copy of Windows. They’ve all worked so far.

Btw - I use Fusion Pro on my Mac and it works great - I’ve got an old version of Solidworks and even that works fine running in a VM.

I think for professional use (but also ease of use) vmware is unbeatable. And it’s fairly cheap really. for what it gives you. “Player” is for free if you have a staged environment you want to give to your clients. Fusion/workstation now supports containers natively - which is pretty cool.
We started offload some “server side stuff” (some parts of CICD and structured Documentation) to Github using GH actions
vmware it also allows to run a Windows-App “seamless” - so you can run just a windows app on your Linux OSX Desktop (as an example).

Drawback on all of those full fledge VM/Guests is the patch management. So in case you need to patch dozens of images or upgrade a toolchain. That can become quite a time hog, but usually is neglectable compared to messing on a single system and the damage you can cause there.
We also moved some Images from Fusion to ESXi (which, with constraints, you can get for free) - thats super easy as well…

Some things to think about:

  • What guest OS you need
  • You need direct HW access
  • You need UI support and/or grahpics acceleration support
  • Does it need to run IDE or just toolchain ?
    – advised to still do “normal” data storage (eg to cloud/server) from the VM, even you can backup the VM as such.

But IMHO its overkill to just have a full VM for each customer. LTS Projects are something else again.

OH! Didn’t know about that. So if I want to run Fusion360 or Altium from a Linux machine, it makes that sort of thing possible?

That’s probably right, but as I get into it, it’s the right solution for right now. This is one area where I want to be secure knowing my data will be preserved between host machines, but don’t want to spend the time optimizing it. Plus, storage is cheap. On that topic…

Are you able to store backups of your images somewhere on a server automatically? Or just using a backup service like Dropbox or similar?

Possible, yes, but performance is never quite as good as native. I’ve run Altium in VMWare Fusion on Mac. It’s good enough for making small changes, but I always switch to a Windows machine to get real work done. The VM just isn’t quite as responsive and there are always small quirks with input handling.

As for VMs: I don’t do anything graphical in a VM, but most of my command line work is done in Linux containers on a Proxmox server. Proxmox makes it trivially easy to create new containers that share resources on the server. You can even install a full GUI and use remote desktop to connect to each container if you’d like.

Are you able to store backups of your images somewhere on a server automatically? Or just using a backup service like Dropbox or similar?
To me a VM Image in this context is a disposable object. “A” Element in a toolchain.
I try to separate Data from OS from Application. So at any given point you can destroy the VM but retain the data in a consumable form (eg git & backup). An entire VM image with data is like a cassette tape with Data in some time from now :wink: so no eternal backup strategy here.
That way images (which easily bloats to 30G/50G depending on OS and Apps) doesnt need to be expensively retained. I keep them on a local raid5 NAS to leverage snapshot in VMs and that but if they die so be it - i have the data along my workflow.

To toss another hat into here! If you have Windows 10 Pro, you can use the built in Hyper V tool and manager to spin up VMs out of the box so to speak. It supports Windows (although I’m not entirely sure how this works as I saw something about a limited license time) and Ubuntu, but it also supports creating VMs from bare ISOs too. So this means you don’t need to worry about the limited license time on the Windows VM as you don’t -need- a license for Windows 10 to use it. Although that does get into a bit of a grey area, but there’s the argument to be made that you are only really using one computer at a time when you are using a VM???

Oh! It has snapshots too, so you can easily roll back changes if you make a mistake that you don’t like. They don’t take up that much space from what I remember.

I used to use Virtualbox for my home projects, but why not use a built in tool if you have it. It’s comprehensive and fast.

I’m not sure how well this works for “professional” deployment or if it covers enough use cases, but it’s an option and free if you have a Win10 Pro install. I know that my last job used Hyper V for all of their server deployments and when I needed a VM, that’s what they told me to use.

Note: Unless you’re running a volume-licensed version of Windows, you need a separate license for Windows running inside a virtual machine. The virtual machine’s operating system is independent of the host operating system.

Source: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine

Ahh, yeah that sounds about right. But at least you don’t need to buy another piece of software too!