I kept coming across this thread when trying to find work-arounds for connecting to my work Cisco AnyConnect VPN without disconnecting from the Mac Virtual Display on my Apple Vision Pro. Maybe this will help others.
I tried changing the config on the AirPlay ports (mentioned in other replies here), but Cisco AnyConnect (4.9) VPN didn’t allow this. Since the Cisco client is distributed by my company, I cannot upgrade to 5.x.
What worked for me was to create a UTM virtual machine (macOS Sonoma, https://mac.getutm.app/) on my personal MacBook Pro (M3 Max, but should work on all Apple silicon MBPs), and I installed the Cisco client + MS Remote Desktop on the virtual machine. My MacBook Pro maintains local access and shares internet access with the virtual machine. The VM registers the network access as Ethernet, and the VPN manages these ports.
Now when I’m using my Apple Vision Pro and Mac Virtual Display, and I want to use the VPN to access my work machine, I start the Virtual Machine on my MacBook, connect the VPN, and then remote in to my work PC. The Mac Virtual Display remains connected to the Apple Vision Pro.
Virtual Machine installation
- Download UTM for Mac (on your main computer)
- Downloaded Install macOS Sonoma from Apple App Store (on main computer), but cancel out of the installation process the first chance you get. https://apps.apple.com/us/app/macos-sonoma/id6450717509?mt=12
- Install UTM for Mac (on main computer) https://mac.getutm.app/
- Create Virtual Machine with Install macOS Sonoma (after it downloads from the App Store on your main computer, it will be in your Applications folder)
- skip connecting the virtual machine to any Apple account, and skip everything you possibly can
- start VM and install Cisco client from your company
- install beta version of MS Remote Desktop (since Apple App Store doesn’t work without being logged in) https://install.appcenter.ms/orgs/rdmacios-k2vy/apps/microsoft-remote-desktop-for-mac/distribution_groups/all-users-of-microsoft-remote-desktop-for-mac
Notes on Configuration of Virtual Machine
I configured the VM with 4gb of RAM and 50 gb of disk space, but I’ll probably reduce these in the future since the VM has one job: connect to my work PC through the VPN. I only lose this RAM from the main machine when the VM is running. Additionally, I uninstalled every app I could, and set Cisco and MS Remote Desktop to run on startup to reduce mouse clicks. I set Cisco to start the VPN when the app starts as well. In the VM macOS User settings, I set it to log in automatically (without a password).