[英]How can I use Azure-provided DNS for Resource Manager VMs?
I've been migrating my Azure resources from the V1 Service Management API to the V2 Resource Manager API, but am not sure about Azure-provided DNS. 我一直在将我的Azure资源从V1服务管理API迁移到V2资源管理器API,但是不确定Azure提供的DNS。 Previously I could ping hosts within the same Cloud Service, however there are no more Cloud Services in V2. 以前,我可以ping同一个Cloud Service中的主机,但是在V2中不再有Cloud Services。 Hosts cannot ping each other within the same Resource Group either. 主机也不能在同一资源组中相互ping通。
The only change I have made is adding the hostname to /etc/hosts, so a VM can ping itself (resolving to 127.0.0.1): 我所做的唯一更改是将主机名添加到/ etc / hosts中,以便VM可以ping通自身(解析为127.0.0.1):
127.0.0.1 localhost
127.0.0.1 myazurevmhostname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The resolv.conf file is left as the default: resolv.conf文件保留为默认值:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.2.2
nameserver 10.0.2.3
search reddog.microsoft.com
So if I had the VMs myvm1
and myvm2
, I am expecting to be able to nslookup myvm2
from myvm1
, however this does not work. 因此,如果我拥有虚拟机myvm1
和myvm2
,则希望能够从myvm1
nslookup myvm2
myvm1
,但这是行不通的。 So how can I create a 'cloud only' network with Resource Manager, without having to provide my own DNS server? 那么,如何在不提供我自己的DNS服务器的情况下使用Resource Manager创建“仅云”网络?
Update Since I asked this question originally, Microsoft have made changes on the backend to allow internal name resolution without a DNS server. 更新自从我最初问这个问题以来,Microsoft在后端进行了更改,以允许内部名称解析而不使用DNS服务器。
For the Resource Manager API most things are centered around a resource group. 对于Resource Manager API,大多数事情都围绕一个资源组进行。
eg 例如
Deployment Model: Resource group 部署模型:资源组
Associate: VM's w/ virtual network & resource group 关联:VM的虚拟网络和资源组
For Internal Name Resolution(Private IP): - Create a Resource Group - Create a virtual network (associate w/ resource group) - Configure ip range and subnets - Create virtual machine(s) (associate w/ resource group & virtual network) 对于内部名称解析(专用IP): -创建资源组-创建虚拟网络(与资源组关联)-配置ip范围和子网-创建虚拟机(与资源组和虚拟网络关联)
For External Name Resolution(Public IP): In the new azure management portal: 对于外部名称解析(公共IP):在新的Azure管理门户中:
It's not as nice of an address as the cloud services (vmname.cloudapp.net) 地址不如云服务(vmname.cloudapp.net)
You end up with: yourdnslabel.locationname.cloudapp.azure.com 您最终得到:yourdnslabel.locationname.cloudapp.azure.com
eg yourwebsrv.eastus.cloudapp.azure.com 例如yourwebsrv.eastus.cloudapp.azure.com
You can add a new resource from the Microsoft.Network resource provider. 您可以从Microsoft.Network资源提供程序中添加新资源。 If you are using ARM templates, the schema can be found in this MSDN Article : 如果您使用的是ARM模板, 则可以在此MSDN文章中找到该架构 :
If you are using PowerShell, the reference of the Network cmdlets for Azure Resource Manager is in this another MSDN Article : 如果您使用的是PowerShell,Azure资源管理器的网络cmdlet的引用在另一篇MSDN文章中 :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.