Great Idea, thank you very much!

From: Gary Wu [mailto:gary.i...@huawei.com]
Sent: Wednesday, September 27, 2017 9:48 PM
To: Shlosberg, Yuli <ys9...@intl.att.com>
Cc: Lando,Michael <ml6...@intl.att.com>; onap-discuss@lists.onap.org
Subject: [integration] RE: Small technical question regarding VM

Generally it's better to avoid looking for specific interfaces.

Maybe try something like "ip route get 8.8.8.8" and parsing the output?

Thanks,
Gary

From: Shlosberg, Yuli [mailto:ys9...@intl.att.com]
Sent: Wednesday, September 27, 2017 11:17 AM
To: Gary Wu <gary.i...@huawei.com<mailto:gary.i...@huawei.com>>
Cc: Lando,Michael <ml6...@intl.att.com<mailto:ml6...@intl.att.com>>
Subject: Small technical question regarding VM

Hi Gary,

Small technical question, in my test I need to know what is the host IP of VM 
that my test is executed on.

So I'm trying to get the IP from eth0 interface, but it seems that there is no 
such interface

03:11:08 ++++ ifconfig eth0
03:11:08 ++++ grep 'inet addr'
03:11:08 ++++ tr -s ' '
03:11:08 ++++ cut '-d ' -f3
03:11:08 ++++ cut -d: -f2
03:11:08 eth0: error fetching interface information: Device not found

Could you please help me understand how to get the IP?

Many thanks in advance,
Yuli

_______________________________________________
onap-discuss mailing list
onap-discuss@lists.onap.org
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to