Parallels Desktop for Multi-platform Development on macOS

Share this:

To enhance my work experience, I develop small helper utilities on my Mac. Sometimes, these utilities are useful enough that I would share them out to use. However, I do know that not everyone is on a Mac. So I will pre-compile my Go code into Windows and Linux binaries. While developing multi-platform applications with Go on macOS is straightforward, testing presents challenges. This is where Parallels Desktop proves invaluable.

Running Windows and Linux VMs on macOS using Parallels Desktop 20

Run Multi-platform Tests on Parallels Desktop VMs

With Parallels Desktop, I can easily create Windows 11 and Ubuntu Linux desktops to test my compiled binaries. This way, I can see if it’s working well for users using those platforms as their primary OS. Since all new Apple Silicon Macs are ARM-based, I was initially concerned about testing x64-targeted binaries. On macOS, Rosetta works like a charm. In my test with Windows 11 ARM, it was able to emulate and execute x64 binaries that I compiled as well.

However, Linux lacks native x64 to ARM emulation. At least not Ubuntu 22.04 for ARM. You can see that in the screenshot below that the binary that I initially compiled for x64 architecture failed to execute. It wasn’t until I recompiled it to ARM64 architecture that I could test it.

Parallels Desktop also has some nifty features to help the quality of a developer’s life when using the VMs for development. For example, opening up an SSH terminal into the VM is as simple as just a click of a button.

Parallels Desktop pre-configured Ubuntu VM with Rosetta!

Interestingly, Parallels Desktop included an Ubuntu VM that is already pre-configured with support for Rosetta to run x64 executables. Yes you can manually install it too, but Parallels Desktop made the whole process a single-click setup and I got a new Linux VM in less than 10 minutes.

As you can see below, my compiled program for x64 architecture can now be tested properly on my Mac. That’s really handy and saved me a whole bunch of time!

Parallels Desktop – Visual Studio Code integration

For Visual Studio Code users, Parallels Desktop offers an extension that integrates with the IDE. This extension allows you to control the VMs directly from Visual Studio Code. The extensions also shows any docker containers running on the VM.

You can also easily access the SSH terminal of the VM directly from VS Code. Parallels Desktop also makes it very easy to share (mount) your Mac’s folder to the VM. This therefore makes it very easy to code and test on the various VMs running on your Mac.

Pre-packaged AI Development Package

Finally, Parallels includes an AI Development Package in its catalog. You can access and download this directly from Visual Studio Code’s extension. AI is all the rage now isn’t it? 😀

I’m personally not an expert of developing AI apps at the moment. But I thought this might be interesting if you are looking to set up a Linux VM to run local LLMs or have relevant AI-related libraries as a quick kickstart to your AI journey.

The team at Parallels also pre-installed Visual Studio Code in the VM along with some code samples. I might take some time to explore what this pre-packaged VM includes. According to the page here, the VM includes tools like Ollama, OpenWebUI, Docker CE, Pandoc, Torch, Pandas, llama-cpp-python, NumPy, TensorFlow and more.

Use code “ATPEAZ” for 10% off as well for Parallels. Code is valid till 10 November 2024!



If this post has been useful, support me by buying me a latte or two 🙂
Buy Me A Coffee
Share this:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.