In order to access different subnets you need to have routing in place. In your case what you need is NAT networking, so that the VM with its private IP address will be routed through a public IP address. You can achieve this by setting up a virtual router VM (e.g. pfSense) with multiple virtual network adapters, and each one of them connected to a different port group.
André