Search code examples
google-cloud-platformgoogle-apigoogle-cloud-shellgoogle-cloud-networking

Is it possible to have the Cloud shell and the VM within the same VPC?


I want to have the google Cloud Shell and the VM within the same VPC, so that I can access the windows VM via its internal IP address. I setup a Serveless VPC access connector so that I can access the VM via cloud shell. But I am unable to ping the VM via its internal IP address, which implies that it is not in the same VPC.

Does anyone know if its possible to ping the VM from cloud shell using its internal IP address?


Solution

  • We cannot use Cloud Shell to access or ping internal IP address from VM instance for the reason that it is on a separate network. You can check this by running this command ip -4 addr in your cloud shell.