Why run the Clarion IDE in a Virtual Machine aka VM

May I ask what’s the reason for running it inside a VM? Is it more stable? More easy to recover or something?

I’m a consultant and work on projects from many different customers. I find it easier to keep everything separate by having a VM dedicated to each customer. That holds their data, programs, source code, and documents. Just keeps everything clean.
I don’t have to worry when sharing my screen in a meeting that something from one customer might get displayed to another, etc.
Also, it makes it very easy to transfer to a new system. Copy the VM and boot and I have their entire environment.

In my case there are a couple of reasons.

  1. The VM is purely a development machine - no other software not needed for development lives there. I also do not have antivirus nor any other processes that could slow it down and plenty of RAM. I turn off every windows service not needed for Clarion. One of my friendly customers have bought a powerful server with 256G RAM and fast NVME drives. They do not use half of this RAM and storage so far so there is plenty for my VM. Of course they know I’m using, but they don’t mind as long as their system runs fine. That VM is actually faster than my laptop.
  2. VM is easy to backup. I dump the VM whenever I change my dev environment.
  3. VM is easy to copy if I need to test something - I simply copy the VM, install whatever and if I don’t like it I remove the whole thing or revert to snapshot taken before. Furthermore I can still use my stable dev environment and experiment on the VM in the meantime. I just set different themes on production and test VMs, to see clearly where I am.
  4. Having a VM on the customer site makes it easier to test with their database. I do not download customer data to my own machines for security reasons. Instead I VPN to their site, RDP to my VM and have access to a test copy of their database which I can update to the latest database dump quickly. Of course this apples to small clients only, big clients would not allow it, but small ones are happy I can actually run their production system. Makes troubleshooting much easier when I have Clarion and other tools on my VM on their site.
  5. I still have Clarion 6.3 on an XP VM in case I needed it. It does crash on SSD drives, but I keep it on old server hardware. Have not used it for the past 2 or more years but you never know.

You can easily buy a second hand few years old server hardware for as little as few hundred US$ and put it in your basement. The one my client (mentioned in # 1) bought was around 500, my Windows laptop was £ 1200 and it has signifficantly less RAM and storage.

Of course copying a VM takes time, but it is a passive time as you can do something else while doing this. Reverting changes on your main machine can take considerably more active time.

The caveat is that if you can have many VMs you will and may ultimately get lost which one is for what. I deal with this by naming them sbx (sandbox) to know I can safely delete the ones I do not remember what they were for.

Would be interesting to expand on this … e.g. what VM Software you have used in the past but stopped, use currently, and likes and dislikes?

Charles convinced me to setup my new machine using VMs and I largely like it.

The motivation was that I didn’t want to go through the hassle of setting up everything the next time I updated my machine. The theory is that I can just backup my VMs and install them on a clean Windows box. This was appealing to me because the last upgrade was a nightmare because of the differences in hardware between my old machine and new machine. I had all sorts of problems with software which was supposed to be able to handle these upgrades - yes, I no longer subscribe to Acronis!

I use Virtualbox which is very easy to set up and configure and has largely been stable. I have been using it for about 5 years with a Windows 10 32bit operating system so I could maintain a Clarion 6 application.

Taking a regular backup of the VMs makes rolling back, or re-installing systems much simpler!

I have 4 complaints about using Virtualbox…

  1. It freezes occasionally which is inconvenient and a bit worrying, but I’ve never lost anything …yet!
  2. A new machine has a set disk size and upgrading the disk size is a bit of a rigmarole which requires me spending several hours looking for the correct steps to take. (I think there might be a setting for having automatic disk sizing but I haven’t found it yet with the latest versions of Virtualbox)
  3. Some software I need to use on all my VMs - e.g. my business systems; which means I often need more than one machine running at a time. I’m not a big fan of this. I also need Snagit and Camtasia for most VMs and I’ve found it is better to have these on the host machine since they can still record what is displayed in the VM. Email also runs on my host machine.
  4. Sound and Video don’t work very well in my Virtualbox VMs. It might be a lack of resources, I don’t know, but I can’t play videos on them, so this is also a host machine only operation.

Otherwise I’m happy and feeling more secure about my setup.

I’ve used VMWare Workstation for more than 15 years since reading Friedrich’s glowing endorsement.
I have one primary dev VM that has my Clarion environments and Outlook/MS Office.

I have other VMs for testing. It’s easy to make a snapshot, then roll back if something isn’t what I want.

I have an entire Windows Active Directory domain with servers, clients, DNS, Certificate Services, etc. in VMs for testing. (That was originally built under Hyper-V but I migrated it to VMWare some years back.)

I’ve also got an old XP VM with Clarion 6. And for some reason, Windows 98.

Several times during those 15 years on VMWare, my host laptop has developed a problem. An hour later, my entire environment was up and running on a spare laptop on which I keep VMWare installed. For me, that’s pure gold.
That’s also been the case when I’ve upgraded to new host hardware, installed VMWare, copied the VMWare virtual disks, and been back running.

Speaking of disks, it’s easy to add more space when needed (assuming the host hardware has enough).

VMWare has been a bit more obnoxious to install in the years since Broadcom bought it. The good part is that VMWare Workstation is now free. They’ve also eased the update process by making it accessible from Workstation itself rather than needing to navigate their website. It’s been rock stable.

In order of preference.

VMware since Workstation 5 and Esxi. It just hits the spot.

MS Hyper-V. Bloated and slow and doesnt hit the spot like VMware workstation does.

Tried Oracle Virtual Box on and off over the years on PC and *nix distro’s, doesnt work well out the box.

Qemu for when I need to run non x86-64 OS’s (Arm instruction sets) on a desktop. Mileage is highly variable.

I run Linux as my host. It has email and browsers. All dev in in several VM’s
I use VirtualBox because it comes with the distro and so setup is a breeze :slight_smile:

As others have said. Movement between systems is easier. Separation of customers is simple and easy. Testing is easier.

It really does make like just a little better :slight_smile:

Hi there
As others have mentioned there are various advantages in using a VM.
For Development:
It allows you to keep coding and Clarion separate from your day to day workstation. You do still need to protect the VM with anti-virus etc because it is literally a Virtual PC.

Other advantages are that you can easily back it up, copy it to another piece of hardware.
In Clarion terms you could for example have a C11 VM and a separate C12 VM.

In addition it is useful at a client’s site if you need to make modifications to their applications without needing another Clarion install (not a good on a production system).

I’ve found VirtualBox quite good for this purpose. There are versions of VirtualBox for Windows, Linux and MacOS. I’ve run it on both Windows and Linux.

Because the VM is a “container” you can move/copy it between operating systems and it’ll work (you need to copy more than just the Virtual Machine itself - there a settings files that need to be copied as well)

For Production
Using a VM in a production environment allows you to easily backup the VM/s to an external drive. It’s also possible to easily run multiple VMs on the same hardware (often referred to as"bare metal"). Cloning a VM is much easier than trying to clone a “bare metal” system.

In my case I run an HP Z240 Workstation as my on premises server using Proxmox. The Z240 has 64gb of RAM and NVME, sata and sata SSD drives. The performance is increduble even though the machine is dated. I run 4 x Windows 11 VMs of various configurations. One of the VMs runs TS Plus. I also have a couple of Linux VMs and a Windows Server 2022 VM.

I have a couple of clients running Proxmox on a different hardware configuration with several VMs on each - the performance is incredible.

If you’re using the IP Server and/or SQL Server (of various flavours) it makes it very easy to install the database/server in its own VM - there are a number of benefits for doing this including ease of backup, security and I think better performance.

Testing
The great thing is that you can test using VMs to check whether your software runs well in different operating systems.

It’s also an option to a allow a client to “try before they buy” with your software. Keeping everything self contained.

As an aside I decided to see how well my main Clarion application, the Appbroker, Anyscreen and the IP Server performed on a Linux VM running WINE. Anyscreen was a no go but the other applications worked with a bit of tweaking. Would I deploy this to a client? Doubtful, but given that we’re software developers (and meant to be innovators :slight_smile: it seemed worthwhile exploring.

Which VMs?
I’ve never used VMWare. So I can’t comment on it.

VirtualBox - great for a personal VM. I have tried it with clients and found that it’s not reliable enough for multi-user production systems.

Proxmox - I was introduced to Proxmox last year by a young network engineer.
It’s a bit of a learning curve but very configurable, and will run on older hardware and is rock solid. It’s a version of Debian Linux.

Proxmox does allow you to define the type of drive (IDE, Sata, SCSI) that the VM OS will use which is rather handy for older versions of Windows that don’t have the current driver suite.

I’ve purchased a number of second hand HPZ240 SFF Workstations as drop in place Jobcard Servers which will run Proxmox - I haven’t deployed any of them yet.

Hardware Suggestion
If you’re going to run a VM, make sure you have plenty of RAM and preferably at a minimum drives that are Sata SSD - NVME is better (you can get PCIe adaptors that work well - I use the Simplecom brand for older machines)

If you want your VM to support multiple users - especially TS Plus, a Xeon processor or AMD equivalent (all other things being equal) will handle the load much better.

Cheers
Rohan

Just checking it out now. It sounds like Vmware’s Esxi. Esxi is aimed at the datacentre.

Proxmox is a powerful, open-source platform used for enterprise virtualization. Built on Debian Linux, it combines two virtualization technologies—KVM Virtual Machines and LXC Containers—allowing you to run and manage multiple operating systems and applications from a single physical server or a cluster of servers.

Dual Virtualization: Supports both Virtual Machines (VMs) for full hardware emulation (like Windows or Linux) and lightweight Linux Containers (LXC) for highly efficient, shared-kernel applications

Like Esxi, it looks a bit overkill for the typical dev, but it could be useful for isolating multiple local & cloud-based LLM’s.

I’ve been running Clarion inside virtual machines for about 15 years.

Like Jane, Friedrich Linder of SetupBuilder was the one who first convinced me to do it, and his reasoning was simple: when you move to new hardware, you shouldn’t have to spend a day or two reinstalling Clarion, third-party templates, utilities, and everything else required to get your development environment back exactly the way you like it.

With a VM, I install the virtualization software on the new machine, point it to the VM image, and I’m usually back to work almost immediately. At worst, I may need to update the guest additions or integration tools.

For virtualization, I use Oracle VirtualBox. It’s free, it works well, and although I evaluated VMware when it was available as a paid alternative, I never found a compelling reason to spend the money.

My only real complaint with VirtualBox comes from the way I sometimes work it pretty hard. I may download a ZIP file on the host, place it on a shared drive, open the ZIP directly from there inside the VM, and copy its contents over an existing repository in the VM.

That’s convenient and usually works very well, but every once in a while it causes the VM to crash.

I’ve never lost anything when that happens. I simply reboot the VM, shut it down normally, bring it back up, and continue working. Considering the kind of cross-system file activity I’m asking it to handle, I consider that a small price to pay and it only takes a couple of minutes to get back to where I was.

It’s worth noting that if I copy the zip file into the VM drive, and unzip it from there the crash never happens. But my shortcut of copying files directly from within the zip will give an error (and it is documented in the Virtualbox forums) so this one is on me for being lazy.

Other than by this particular form of abuse by me I never see Virtualbox crash or hang.

The main advice I would give anyone using VirtualBox is not to install every update the moment it appears. When a new version is released, I normally wait a week or two before installing it. Every once in a while, like any other piece of software, a release may contain a bug that gets discovered and corrected shortly afterward.

As I like to say, it’s better to be on the cutting edge of technology than the bleeding edge.

Years ago, VMs were also useful for testing programs against different versions of Windows. That matters less now. If your application works correctly on Windows 10 and Windows 11, you’ve probably covered almost everyone you need to support.

But there are still plenty of other reasons to use virtual machines.

One is access to older versions of Clarion and older software that require a 32 bit OS. I still have VMs running Windows XP. I rarely boot them unless I need to run something that only exists there, but the option is available.

Another is to keep old computers where you can access something on them without needing to keep them around.

Disk2VHD is extremely useful for converting old physical computers into VM images. Instead of keeping a closet full of aging computers that may not even boot anymore, I can start the old system virtually whenever I need it.

More often, I simply mount one of those old virtual hard drives as an additional drive inside my current working VM. That gives me immediate access to old source code, documents, utilities, and other files without needing to boot the original operating system.

Everything is also backed up to the cloud with SpiderOakOne, so the VM image is never the only copy.

Today, there is another important reason to work inside a VM: AI and agent-based development tools.

Giving an AI agent broad access to your host operating system is not something I consider wise. The AI may promise to remain inside its assigned folder, follow every rule, and avoid touching anything it wasn’t given permission to touch. But all it takes is one mistake, one bad command, one misunderstood instruction, or one malicious dependency for it to step outside those boundaries.

If the development environment is inside a VM, then the VM becomes the boundary. If something goes badly wrong, the damage is contained. You can restore a snapshot or replace the VM without risking the machine where your personal files, email, passwords, financial records, and everything else live.

For agent-based tools, I would go even further. Limit the VM’s access to your local network, shared folders, other computers, and anything else it does not genuinely need. A sandbox is only useful when it has real walls.

I wrote about that a while back on Ask Good Questions:
https://askgoodquestions.dev/guides/you-have-to-invite-the-vampire-in

I also find that a VM works especially well with my multi-monitor setup.

I normally use the left monitor for the host operating system, including web browsing and my interaction with AI. The center monitor is dedicated to the operating system running inside the VM, where Clarion and the actual development work live. The right monitor normally has MailWasher and email.

That gives me access to the tools I need on the host while keeping the development environment isolated and directly in front of me.

I don’t use the mode that tries to merge the host and guest operating systems together into one desktop. I find it cleaner to keep the VM contained on its own screen. When I click an icon or application on one of the side monitors, the keyboard and mouse focus return to the host. When I click back into the center monitor, I’m working inside the VM again.

I also regularly run more than one VM at a time. It’s easy enough to pull down the VirtualBox menu, minimize one VM, and switch to another.

With regards to sound and video in the VM, it seems to be a combination of fairly new hardware, plenty of memory in the VM and making sure your drivers are up to date. I run Windows 11 on the host OS and as my main development VM and sound and video are fine in my particular setup. But I can definitely remember having problems both with older hardware and older OS’s.

Virtual machines are also convenient when traveling. I normally use TeamViewer to connect back to my host computer when I’m away from home or working from my boat. However, if I’m going somewhere where I may not have reliable internet access, I can copy the Clarion VM image to my laptop and take the entire development environment with me.

When I return, I can copy the updated image back.

For me, the main reason to run Clarion, or almost any serious development environment in a VM is simply sanity.

You avoid repeated installations, preserve older working environments, gain an easy recovery path, isolate experimental tools, make moving to new hardware nearly painless, and can take your entire working environment with you when necessary.

Virtual machines are simply the way to go as far as I’m concerned. After working this way for 15 years, I can’t imagine going back to installing and maintaining everything directly on the host operating system.

Charles

It also depends on what your business activities cover.

I offer both software and IT support/installations.

Many clients have their own IT departments or IT Support contractors and only use my software and no other services.

Other clients need a lot of guidance and support with their IT beyond the software. I offer support.down to which printers are better suited or installing SSL certificates (I just installed https://caddyserver.com/ this weekend for a client to manage two servers’ SSL certificates - Anyscreen, Clarion Appbroker and TS Plus).

Proxmox is great for production systems (and also stress testing for deployments). I’ve found it’s allowed me to reuse equipment that would often be “retired”.

VirtualBox is great for development. The fact that you can run it on Windows or Linux (or MacOS) is great. My own general preference is to run VirtualBox on top of Linux as Linux is much more stable (in my opinion).

I agree on all points.

Used to, not any more. The fields are too big and my brain has limited capacity. :wink: