There are often times when I’d like to take a retina-quality screenshot of something on a macOS system (for this blog, or a presentation, for example), but I’d like to screenshot something that I’ve got running in a virtual machine. macOS VMs by default run at a standard resolution that’s upscaled to the retina screen, making it look blocky by comparison - and more importantly, any screenshots taken within the guest VM will not be retina-resolution.
In this image I’ve stacked up two views of the General system preference pane, with the VM’s on top, and my 5K retina iMac’s on the bottom, for comparison (note that this difference will only be easily discernable if you’re actually reading this on a retina device):
VMware Fusion does however have retina display support, whereby VMs can be enabled to run at the native pixel resolution at the given VM window size, documented here. Since a picture’s worth a thousand words, it looks like this:
That VMware KB includes this note:
Mac OS X running in a virtual machine is limited to an approximate resolution of 2560 x 1600, and treats the display as a standard DPI device. This makes the text and icons to appear small in the OS X interface.
Indeed, toggling this setting immediately scales back the VM resolution and, while giving us more screen real-estate, makes things look tiny. Here’s the Displays preference pane running in this configuration:
Luckily, Apple also supports this WindowServer preference that will force listing HiDPI-equivalent modes for the available resolution, which I’ve seen documented several places before like here:
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
You’ll need to at least log out and log back in again, but now listing the available resolution modes in the Displays preference pane should now expose a HiDPI version, which will actually render the window elements to look as they do on your native display:
The trick here that prompted me to write this is up is that I needed to set both the guest VM’s window server settings and VMware Fusion’s support for rendering a retina resolution VM window. It’s not enough to just set one or the other. Happy screenshotting!