Tips of the year: work around bugs and limitations
Although blogs are intended to consist of articles and readers’ comments, sometimes they develop into exchanges of information that provide workarounds for apparently insoluble problems. Two in particular stick in my mind from the past year: how to change the password of an encrypted sparse bundle, and how to use an ISO keyboard with a macOS virtual machine (VM). For the latter, we’re indebted to Tobias Bussmann, who first suggested it here.
Change the password of an encrypted sparse bundle
Until Ventura 13.2.1, encrypted sparse bundles seem to have worked as advertised, but changing their password stopped working by macOS Ventura 13.3.1, and still doesn’t work in Sonoma 14.2.1, despite multiple Feedback reports to Apple. If the password for an encrypted sparse bundle may have been compromised, it’s essential that you change it as quickly as possible. Once you’ve updated your Mac past Ventura 13.2.1, the only way to do this using hdiutil chpass doesn’t work.
All you need then is a VM running, say, Ventura 13.2.1, and you can use that to change the password. Rather than opening the VM using Vimy, use Viable and set its custom Shared Folder to the volume or folder containing your sparse bundle. Run the VM, and in the Finder locate that sparse bundle in My Shared Files. Open Terminal, and type into it the first part of the command, followed by a space
hdiutil chpass
Drag and drop the sparse bundle onto the end of that line to add its full path to the command, and press Return. You’ll next be prompted for its existing password, then to enter the new password twice.
When that’s done, try mounting that sparse bundle in the host, and you’ll need to enter the new password. Quit Terminal in the VM, then shut the VM down. The job has been done.
Enhance your macOS VM’s features
Features available in macOS VMs running on Apple silicon vary depending on which version of macOS you’re virtualising. Some of those that may be missing in the virtualiser and VMs you’re using include:
Drag and drop files between Finder windows in the VM and those on the host, to copy them.
Full support for ISO keyboard layouts, including the key at the left of the numbers row..
A shared clipboard for copy and paste between the VM and the host.
Standard key shortcuts to make screenshots of windows or the virtual display.
Trackpad controls including gestures and smooth action with all guests.
To add all these features to all VMs, even Monterey, use Screen Sharing or Apple Remote Desktop (ARD).
First ensure the VM is running and has a network connection. Then open System Preferences or System Settings, and (General) Sharing. Tick the Remote Management item there, and enable the features in its settings. These have changed in Ventura and Sonoma, where this now requires two views.
The first is opened by clicking on the ⓘ button by the switch control.
The second is opened using the Options… button at the foot of the first.
On the host, open the Screen Sharing app in /Applications/Utilities, or Remote Desktop, select the VM there and opt to Control it. You should then be prompted to enter the user name and password for the user in the VM. If you’re offered the option of High Performance for the Screen Sharing Type, do not select it, but choose the normal option instead. At present, High Performance screen sharing doesn’t work with VMs, whose virtual display goes blank and prevents you from logging in. If you inadvertently do that, close the connection from the host in Screen Sharing or Remote Desktop, and the virtual display will reappear.
To keep life simple, once the shared window is open, click on the original VM window’s Minimise control (the yellow button at the top left of its window) and control your VM from the shared window instead. You now view and control the host in its ARD window. The only task that you shouldn’t use this for, is when you’re going to update macOS in the VM. That will disconnect ARD and could lead to problems during or after the update.