gyf304 / vmcli

A set of utilities (vmcli + vmctl) for macOS Virtualization.framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make a connection between two guest VMs?

ChangheeOh opened this issue · comments

I have create two guest VMs(w1, w2)and can ssh into both of them from the host Mac.
But I can't ping or anything from w1 to w2 or from w2 to w1.
Please someone help me to resolve this issue.

Network configuration

  • Host Mac: 192.168.64.1
  • w1: 192.168.64.8
  • w2: 192.168.64.9

Ping test result

  • Success: host Mac -> w1, w2
  • Success: w1, w2 -> host Mac
  • Fail: w1 -> w2 (Destination Host Unreachable)
  • Fail: w2 -> w1 (Destination Host Unreachable)

HTTP test result (via curl)

  • Success: host Mac -> w1, w2
  • Success: w1, w2 -> host Mac
  • Fail: w1 -> w2, w2 -> w1
  • Success: w1 -> w1, w2 -> w2

This is currently a limitation of Apple. You can workaround it by setting up a VPN server on your Mac, and connect your VMs to the VPN. (I recommend Wireguard for this)

@gyf304 Thanks for your advices.