I want to know all settings that need to be set in a macOS 15+ virtual mac in order to successfully screen share into it from the physical machine. Also any virtual machine configuration settings I may not understand.
I have successfully set up screen sharing into an macOS 15 M2 mac studio that sits in the corner, on which I am running a cooked up variant of the sample code from apple about virtualizing a mac on a mac. I'm screen sharing into it from my macOS 15 M2 laptop. So I know I have at least one set of screen sharing settings correct.
I have also successfully set up a macOS 14 virtual machine in that app into which I am able to screen share into from the mac studio.
However, when I set up macOS 15 (and macOS 26) virtual machines, connections for screen sharing and file access don't succeed after 1 minute (I get the aqua-colored cylon / knight-rider -style progress bar for a minute, and then a connection failure dialog). I don't get the prompt to choose standard or enhanced. and I don't get asked for my user name and password. I see the virtual machine host names listed in the Finder Network tab (and the screen share button shows in the toolbar when I double click into them) and also when I instead turn on remote management and use Remote Desktop I can see the machine in Bonjour mode. In remote desktop, verifying log in is what fails, but of course those can be specified up front.
I have the Firewalls turned off in the virtual machines, and I've also tried using the explicit vnc:// url with local ip addresses, and that also fails similarly.
Unlike the code sample for virtualization a mac on a mac, in order to support multiple simultaneous virtual machines, I created random mac addresses when initially configuring the machine, and I store those in a config file I use to reconstitute the machine when it restores. I also store the machine identifier that's generated at creation time. Other features in the virtual machines seem to work fine when running either one or both virtual machines. And I have the same problems with screen sharing whether I have one or both machines running. The virtual machine which does not seem to work is the one with the custom sharing name.
I can screen share out of the virtual machines as well, though all they can see is the mac studio, so controlling the same machine I'm on through the VZVirtualMachineView does not go well, but the connections succeed. I'm also able to file share into the mac studio from the virtual machine, which is how I'm doing things like file transfers, but I'd prefer to drag / drop them through the screen share.
I have not tried figuring out if other privacy settings in macOS 15 may be responsible, for instance is there something about screen capturing that should be turned on or off? I don't see any apps set for screen and system audio recording on the real mac studio I'm able to screen share into, so I assumed that wasn't a factor.
My goal isn't to build a fully functional virtual machine app, I just have to run some software in specific versions of mac os (i.e. macOS 14) because they have been discontinued by their makers, and they have a history of always failing when new macOS versions are released. and some other software I can run in macOS 15, but not having working screen sharing means I'm stuck trying to learn all the ins and outs of the virtualization framework, when screen sharing ought to be an easier solution for me for now.