VM中未分配外部IP [英] External IPs not assigned within VM

查看:255
本文介绍了VM中未分配外部IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置几个Centos 6 VM。我为他们分配了静态IP但是在运行ifconfig时,我看不到外部IP,只看到内部IP。谷歌不允许这种能力吗?

I have a couple of Centos 6 VMs that I am trying to setup. I assigned static IPs to them but when running ifconfig, I do not see the external IPs, just the internal IPs. Does Google not allow this capability?

推荐答案

除了Anderson所说的,这是查询外部IP的命令实例本身:

In addition to what Anderson said, this is the command to query for the external IP from the instance itself:

curlhttp://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access -configs / 0 / external-ip-HMetadata-Flavour:Google

这篇关于VM中未分配外部IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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