After the recent update to Viable, my macOS virtualiser for Apple silicon Macs, I turned to its sibling Liviable, which does the same job for Linux, and have now completed all its intended features. These include support for shared folders with the host, and Rosetta 2 conversion of x86_64 binary executables within the VM. Note the latter doesn’t mean you can run x86 Linux on Apple silicon: its distros still have to be built for ARM64.
The main window now has checkboxes to enable shared folders and Rosetta when you run a VM. It can also provide a button to download and install Rosetta if it isn’t already available. Liviable no longer runs in a sandbox, but when accessing protected folders in the Home folder will prompt you for any consent it needs, in the normal way.
As this is Linux, it doesn’t auto-mount shares, as Viable does, but mounting them is straightforward. First create a mount point
Then mount the share there
sudo mount -t virtiofs macdir /tmp/mountpoint
macdir is the fixed tag identifying the share, set in Liviable’s code.
If you then list the mount point using
you should see its two shared folders:
hosthome, the Home folder of the current Mac user, ~/
vmbundle, the top level of the current VM bundle.
Enabling Rosetta 2 in the VM is more complex, and I haven’t yet been able to test this out fully. This requires the command
update-binfmts, which Apple confidently states is in “most Linux distributions”, but those that work best with lightweight virtualisation seem to be exceptions. In Ubuntu, you can download and install its package using the command
sudo /usr/bin/apt-get install binfmt-support
but that isn’t available in other distros.
Once you have that ready, create a mount point as above, this time using the tag
rosdir, and run the command
sudo /usr/sbin/update-binfmts --install rosetta /tmp/mountpoint/rosetta \
--magic "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00" \
--mask "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
--credentials yes --preserve no --fix-binary yes
which ensures the Linux kernel uses Rosetta 2, in the share, as the registered handler for x86_64 ELF binaries, so that Rosetta can convert them into ARM code. This information is provided in detail in Liviable’s Help file and the ReadMe enclosed with the app.
Here’s the potent and popular image editor GIMP running in Rocky Linux, editing a screenshot in the Mac’s ~/Documents folder.
If you’ve used an earlier version of Liviable, you’ll be pleased to know that this update fixes a crashing bug that occurred when installing a second VM in succession.
Finally, unlike macOS, you can run as many Linux VMs concurrently as your Mac can support. Here are four VMs running three different Linux distros between them.
Liviable beta 3 (1.0.3) is now available from here: liviable1b3
from Downloads above, and from its Product Page. It too doesn’t yet have an auto-update feature.