Google Cloud Engine

编程入门 行业动态 更新时间:2024-10-26 06:34:26
本文介绍了Google Cloud Engine-将外部IP地址从CA更改为SG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有centOS 7的Google云计算引擎。它位于Asia-southeast1(SG)。但是,我检查了位于加利福尼亚山景城的外部IP。

I have google cloud compute engine which is centOS 7. It was located in asia-southeast1 (SG). However, I checked the external IP it was on the Mountain View, CA.

是否可以将其可更改的IP更改为新加坡?

Is it possible to change the IP where it can be located to Singapore?

谢谢, Edmhar

Thanks, Edmhar

推荐答案

可以。此时,您需要: 1在需要的区域中保留一个新IP。 2停止您的VM。 3将新IP分配给您的VM。 4重新启动您的VM

Sure. At this moment you need to: 1 Reserve a new IP in the wanted region. 2 Stop your VM. 3 Assign the new IP to your VM. 4 Re-Start your VM

通过控制台进行操作比较容易,但是会花费更多时间。如果您决定使用gcloud。您需要删除访问权限并分配新的访问权限。

It is easier to do it through the console, but will take more time. If you decide to do it with gcloud. You need to delete the access and Assign the new one.

删除访问权限 gcloud计算实例描述[INSTANCE_NAME]

Delete access gcloud compute instances describe [INSTANCE_NAME]

gcloud计算实例delete-access-config [INSTANCE_NAME] \ --access-config-name [ACCESS_CONFIG_NAME]

gcloud compute instances delete-access-config [INSTANCE_NAME] \ --access-config-name "[ACCESS_CONFIG_NAME]"

定义保留新的IP(在此指定实际IP xxxx,而不是其名称)

Define the new IP reserved ( here you specify the actual IP x.x.x.x, not its name)

gcloud计算实例add-access-config [INSTANCE_NAME] \ - -access-config-name [ACCESS_CONFIG_NAME] --address [IP_ADDRESS]

gcloud compute instances add-access-config [INSTANCE_NAME] \ --access-config-name "[ACCESS_CONFIG_NAME]" --address [IP_ADDRESS]

将IP分配给VM

gcloud计算实例add-access-config [INSTANCE_NAME] \ --access-config-name [ACCESS_CONFIG_NAME]

gcloud compute instances add-access-config [INSTANCE_NAME] \ --access-config-name "[ACCESS_CONFIG_NAME]"

官方文档也一步一步来。 cloud.google/compute/docs/配置IP地址

The official documentation has also the step by step. cloud.google/compute/docs/configure-ip-addresses

更多推荐

Google Cloud Engine

本文发布于:2023-11-24 05:17:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624092.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Google   Cloud   Engine

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!