Google Cloud Engine-将外部IP地址从CA更改为SG [英] Google Cloud Engine - Change External IP address from CA to SG

查看:154
本文介绍了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]"

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

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

这篇关于Google Cloud Engine-将外部IP地址从CA更改为SG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆