0
votes

I'm somewhat of a noobie to GCP VMs, so please excuse me if this question is a little too basic.

I've recently created 2 VMs - both Windows 2016. The first one, I created without any template, pretty basic. The second one I created using a template that my company had set up. I don't believe that I've done anything significantly different in the creation of the two other than one being from a template and one not. All of the details within the VM seem to match.

The issue I'm having is this:

  • With the first one (non-template), I was given an external IP, was able to RDP from both the GCP console and the RDP app on my local machine, and I had an internet connection upon connecting.
  • With the second one (template), I was not given an external IP (it says "none" on the GCP console), I'm unable to RDP through the GCP console (the RDP button is greyed out and doesn't allow me to select it), and I do not have an internet connection upon connecting through the RDP app.

I've tried stopping/starting the VM, but other than that I'm not entirely sure what to do. Does anyone know a possible way to fix this?

2
If you've got no external IP, what address is RDP supposed to connect to? You need an external IP. This is not negotiable unless you can somehow tunnel into the internal network. - Iskandar Reza
I've got a gateway VM running that I use as well, so within PuTTy I tunnel in to the internal IP of my Windows VM, while using the external IP of the gateway VM. This is what we were instructed to follow in our documentation - coderX
Any firewalls or ACLs that block the RDP port? It's 3389 if my memory serves me right. - Iskandar Reza
Not that I’m aware of. I am using 3389.. I just can’t figure out why I’m able to do it no problem with the machine I created, but not with the template created machine. The details between the two are almost identical - coderX
Are you able to ping the template machine from the other machines? - Iskandar Reza

2 Answers

0
votes

If you have created a VM without external IP, in Google Console it rdp (or ssh) button will be grayed out.

When you say you are using templates, are you referring to this? Probably your instance template doesn't have external IP.

Review your firewal rules: In your VM details, under Network interfaces you should check Network details (view details). Checkout if the firewall rules for 3389 are there. Also make sure that the Target name you see in the firewall rule is present in the network tags in VM instance details.

0
votes

To get a remote connection to your VM (without setting up peering or VPN tunnels), you'll need to add an external IP address to your VM so that it can NAT your traffic to your instance.

It looks like the template you used does not have an external IP attached in its settings. You will need to click on the VM instance, then edit the settings, and then expand the 'Network Interfaces' section. Once there, you can choose an ephemeral external IP address assigned to your VM.

Bear in mind, that all of the traffic is enforced by the project firewall-rules, so check that RDP is enabled on your firewall setting. If you do not have firewall rules and using the default network, then the RDP firewall rule will be created for you.