Make a ~/vmshare folder on the host for sharing with VMs.
Actually it's gonna be super easy. Barely an inconvenience.
brew install --cask virtualbuddy
In VirtualBuddy, create a new VM with the "+" button in the toolbar.
- I chose macOS Tahoe beta 4.
- I named it "Tahoe beta 4".
- Select to automatically configure the display.
- Attach your shared folder.
- When it's done, dismiss the window.
Launch it and go through setup.
After setup, find the VirtualBuddy helper app and run it. It should hook up clipboard and file sharing.
Power off the working VM. In VirtualBuddy, right-click it and Duplicate. Change its name to something that makes it clear it is a snapshot or template.
brew install --cask virtualbuddy
In VirtualBuddy, create a new VM with the "+" button in the toolbar.
- I chose Debian 12.11.
- I named it "Debian 12".
- For the moment, enter 1024x768 for your display resolution. This will keep the installer at a readable size for a Retina screen.
- There was a bug here: Typing a number didn't affect given dimension until I also typed return.
- Attach your shared folder.
- If you'll run intel binaries in the VM, share Rosetta.
- When it's done, dismiss the window.
Launch it and go through the installer.
- You can use the graphical installer.
- For some step, if you don't know what to choose, take the default.
- For the hostname and domain name, I chose "debian-12" and "debian-12.local" to match the VM name.
- When you choose a disk to partition, if there are two, use the bigger one.
- If you choose a package mirror domain, think of a nearby university and look for its name or initials.
- For packages to install, I chose the desktop environment, Gnome, ssh server, and standard system utilities.
When it's done, let it restart, full-screen the window, and sign in.
Click through the Welcome window. I disabled location services.
Right-click the desktop and choose Display Settings, then select 200% scale for a retina display. That's good enough for now.
Besides display resolution, I changed these settings from their defaults:
- In Settings, Mouse & Touchpad:
- Natural scrolling: On
- In Settings, Accessibility, Typing, Repeat Keys:
- Delay: All the way left, then right-arrow 10 times
- Speed: All the way right, then left-arrow 15 times
- In Terminal preferences:
- Theme variant: Dark
Open a terminal.
$ su
# apt install spice-vdagent
Restart here, and you'll be able to copy and paste between your machine and the VM.
Open a terminal.
$ su
# mkdir -p /mnt/VirtualBuddyShared
# vi /etc/fstab
Append:
# VirtualBuddy shared folder
VirtualBuddyShared /mnt/VirtualBuddyShared virtiofs rw 0 0
Use it:
# systemctl daemon-reload
# mount /mnt/VirtualBuddyShared
Then in the Files app, go to /mnt/VirtualBuddyShared and drag vmshare to save it in the sidebar.
If you're going to use the VM in a window, you can enable automatically configuring the display in the VM settings while shut down. But I find that every window resize resets the scale to 100% which is not readable.
In full screen, if you want the VM to look sharp despite not using a native resolution in macOS:
- Shut down the VM.
- In your Mac's Display settings, select your display panel's native resolution.
- In VirtualBuddy, edit the virtual machine settings and enable automatically configuring the display. This will offer the size of the window's content area as an available screen resolution, which is why we needed your Mac's resolution set to the size that matches the hardware.
- Start the VM and sign in.
- Right-click the desktop and choose Display Settings, then select the resolution matching your hardware. For me that's 3024x1890.
- If you don't know, use ⇧⌘4 to bring up the screenshot tool, drag a box from corner to corner, read the box size by the cursor, and double the numbers for a retina display.
- Having picked the resolution, it should look sharp.
- Make a note of those dimensions.
- Power off again.
- In the virtual machine settings, enter the dimensions and disable automatically configuring the display. This will keep this resolution setting available so you don't have to fiddle with it again. The tradeoff is your boot menu is impossibly small.
- Set your Mac's resolution back to what you prefer. The VM should be unaffected.
Power off the working VM. In VirtualBuddy, right-click it and Duplicate. Change its name to something that makes it clear it is a snapshot or template.
Keep handy:
- https://blog.edwardloveall.com/local-macos-debian-12-with-utm
- https://docs.getutm.app/guest-support/linux/
I chose Debian 12 and got the regular, non-mac image:
brew install --cask utm
In UTM, create a new VM with File > New.
- Choose to virtualize, not emulate.
- Select the ISO you downloaded.
- I chose to enable hardware OpenGL acceleration.
- 8GB was enough storage for me.
- Select your ~/vmshare folder.
- For a name, I chose "Debian 12".
- I chose to open VM settings, but the only change I made was to pick an icon.
Launch it and go through the installer.
Same steps as Apple Silicon above.
When it restarts after setup, during the boot menu screen, use the power icon button in the toolbar to stop the VM. Then remove the ISO.
Launch the VM again, full-screen the window, and sign in.
Click through the Welcome window. I disabled location services.
Right-click the desktop and choose Display Settings, then select a resolution that looks sharp. I chose 1360x768, which is just barely cropped from my laptop's 1366x768.
Using the VM in a window is doable, but changing the window size makes you type your password again due to what looks like a momentary screen lock condition. I was happier leaving it at a fixed resolution in full screen.
Same steps as Apple Silicon above.
Open a terminal.
$ su
# apt install spice-vdagent
Restart here, and you'll be able to copy and paste between your machine and the VM.
Open a terminal.
$ su
# mkdir -p /mnt/utm
# vi /etc/fstab
Append:
# UTM Shared Folder
share /mnt/utm 9p trans=virtio,version=9p2000.L,rw,_netdev,nofail,auto 0 0
Use it:
# systemctl daemon-reload
# mount /mnt/utm
But you can't edit the existing files in there yet. We want the files coming from the host's user to map to the vm's user and vice versa. For that we can use bindfs to make another mount point.
^D to end su
$ ls -na /mnt/utm
Observe the user and group ids of the share, probably 20 and 501. You might need to add a file in here from the host.
$ id
Observe your own user and group ids, probably 1000 and 1000.
$ su
# apt install bindfs
# mkdir -p /mnt/vmshare
# vi /etc/fstab
Append, editing IDs as needed:
# bindfs mount to remap UID/GID
/mnt/utm /mnt/vmshare fuse.bindfs map=501/1000:@20/@1000,x-systemd.requires=/mnt/utm,_netdev,nofail,auto 0 0
Use it:
# systemctl daemon-reload
# mount /mnt/vmshare
Then in the Files app, go to /mnt and drag vmshare to save it in the sidebar.
Power off the working VM. In UTM, right-click it and Clone. Edit it and name it something that makes it clear it is a snapshot or template.