Of course! Creating a "hidden" VNC connection between two local VMs is a great way to manage them.
The term "hidden" usually means you don't want the user on the Mac to see a menu bar icon or get a notification that you've connected. The standard macOS "Screen Sharing" is not ideal for this, as it's very conspicuous.
We'll use a third-party VNC server on the Mac that can be configured to run silently in the background. RealVNC is an excellent choice for this.
Here is a complete step-by-step guide.
Overview
- On the macOS VM: We will install and configure RealVNC Server to run as a background service without a visible icon or notifications.
- On the Windows VM: We will install RealVNC Viewer to connect to the Mac.
- Networking: We'll ensure the VMs can communicate with each other.
Part 1: Configure the macOS VM (The Server)
Step 1: Check Network Settings
For your VMs to see each other easily, they need to be on the same virtual network.
- In your virtualization software (VMware, Parallels, VirtualBox), open the settings for both your Windows and macOS VMs.
- Go to the Network adapter settings.
- Set the network mode to Bridged. This makes each VM act like a separate physical computer on your home network, getting its own IP address. This is the easiest method.
- Alternatively, you can use a "Host-Only" or "Internal" network if you don't want the VMs to access the internet, but Bridged is simplest for connectivity.
Step 2: Install RealVNC Server on macOS
- On your macOS VM, open a web browser and go to the RealVNC Server download page.
- Download and run the installer. Follow the on-screen prompts to complete the installation.
- During setup, it will ask you to sign in or apply a license. You can sign up for a free RealVNC Home account, which allows up to 5 computers for non-commercial use. Sign in with your account to activate the software.
Step 3: Configure RealVNC Server to be "Hidden"
This is the most important part. We need to change the default settings so the VNC server runs silently.
- After installation, the RealVNC Server window will open. If not, open it from your Applications folder.
- Click the hamburger menu (☰) in the top right and select Options.
- Set a Password:
- Go to the Users & Permissions tab.
- Under
Password, click Create a VNC password.
- Set a strong password. This is the password you will use from Windows to connect. It is not your Mac user password.
- Make it "Hidden":
- Go to the Expert tab. This is where the advanced settings are.
- Use the filter box to find and change the following parameters:
ShowTrayIcon: Set this to False. This will hide the VNC icon from the macOS menu bar.
ConnNotifyAll: Set this to False. This stops the "User X is now connected" notification from appearing.
ConnNotifyTimeout: Set this to 0.
- Click Apply and then OK. You may need to restart the RealVNC service for these changes to take effect. You can do this by rebooting the Mac VM or by using the
sudo launchctl commands in Terminal if you're comfortable with that. A reboot is easiest.
Step 4: Find the Mac VM's IP Address
You'll need this address to connect from Windows.
- On the macOS VM, go to System Settings > Network.
- Click on your active network connection (e.g., "Ethernet" or "Wi-Fi").
- The IP address will be displayed there (e.g.,
192.168.1.15). Note this down.
Step 5: Check the macOS Firewall
- Go to System Settings > Network > Firewall.
- If the firewall is on, click Options....
- Ensure that "Automatically allow built-in software to receive incoming connections" and "Automatically allow downloaded signed software to receive incoming connections" are enabled. RealVNC is signed software, so this should be enough. If not, you may need to manually add
VNC Server to the list of allowed applications.
Part 2: Connect from the Windows VM (The Client)
Step 1: Install RealVNC Viewer on Windows
- On your Windows VM, open a web browser and go to the RealVNC Viewer download page.
- Download and install the viewer. It's a simple and quick installation.
Step 2: Connect to the Mac VM
- Launch RealVNC Viewer on your Windows machine.
- In the address bar at the top, type the IP address of your macOS VM that you noted earlier and press Enter.
- An "Identity Check" warning may appear because it's the first time connecting. This is normal. Click Continue.
- A password prompt will appear. Enter the VNC password you created in the RealVNC Server options on the Mac (not your Mac login password).
- Click OK.
You should now be connected to your macOS VM's screen from your Windows VM, with no visible indication on the Mac side that a connection is active.
Troubleshooting & Tips
- Can't Connect?
- Ping Test: The most common issue is networking. Open Command Prompt on your Windows VM and type
ping <mac_vm_ip_address> (e.g., ping 192.168.1.15). If you get a "Request timed out" error, the VMs cannot see each other. Double-check that they are both in Bridged network mode.
- Firewall: Temporarily disable the firewall on both the Windows VM and the macOS VM to see if that's the problem. If the connection then works, you know you need to create a firewall rule to allow traffic on the VNC port (TCP port 5900).
- Performance: VNC can be slow, especially between two VMs on the same machine. In the VNC Viewer window, you can right-click the top bar, go to Properties > Expert, and lower the
PreferredEncoding or set ColorLevel to a lower quality (e.g., rgb111) to improve responsiveness.
- "Hidden" vs. "Invisible": This method hides the connection from a casual user. A technical user could still open Activity Monitor on the Mac and see the
vncserver process running. For your use case, this is perfectly fine.