调用management.azure.com REST API抛出UnknownHostException [英] Call to management.azure.com REST API throwing UnknownHostException

查看:59
本文介绍了调用management.azure.com REST API抛出UnknownHostException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个REST API调用来启动/停止VM。我打包VM并与另一个订阅共享,并使用共享VHD创建新VM。当我尝试在新VM上执行启动/停止VM代码时,获得以下异常:

I have a REST API call to start/stop VM. I packaged VM and shared with another subscription and created new VM with the shared VHD. When I try to execute start/stop VM code on new VM, getting following exception:

"https://management.azure.com/subscriptions/mysubid/resourceGroups/myresgroup/providers/Microsoft.Compute/virtualMachines/qa1/start": management.azure.com; nested exception is java.net.UnknownHostException: management.azure.com




我知道如何解决这个问题?


Any idea how can I solve this?

推荐答案

看起来像你的移动的VM没有正确的DNS enrty。

Looks like your Moved VM dont have a proper DNS enrty.

因为它无法解析"management.azure.com"。到IP地址和连接。

Because of that its unable to resolve "management.azure.com" to the ip address and connect.

你能检查一下是否能用以下命令解决?

Can you check if you are able to resolve using the below command?

nslookup management.azure.com

此外,如果您的最终目标是共享代码来启动和停止VM,您可以写一个
Azure功能并与其他订阅共享代码。 

Also if your end goal is to share the code to start and stop a VM, You can write a Azure function and share the code with other subscription. 


这篇关于调用management.azure.com REST API抛出UnknownHostException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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