简体   繁体   English

如何为资源管理器VM使用Azure提供的DNS?

[英]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. 因此,如果我拥有虚拟机myvm1myvm2 ,则希望能够从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 例如

  • myazurevmresourcegroupname myazurevmresourcegroupname
    • myazurevirutalnetworkname myazurevirutalnetworkname
      • myazurevmhostname myazurevmhostname
      • myazurevmhostname2 myazurevmhostname2

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管理门户中:

  • Go to the virtual machine in question 转到有问题的虚拟机
  • Click on the public ip address 点击公共IP地址
  • In the settings pane click on Configuration 在设置窗格中,单击“配置”。
  • Change DNS name label 更改DNS名称标签

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.

相关问题 如何在带有Linux的Azure App Services中使用自定义DNS服务器? - How can I use a custom DNS server in Azure App Services with Linux? 如何在 Windows Azure 中配置我的 Web 应用程序以根据请求 URL 将请求重定向到不同的 VM? - How can I configure my Web App in Windows Azure to redirect the requests to different VMs based on the request URL? 如何在Azure的资源管理器中访问VM上的特定端口 - How do I access a specific port on a VM in Azure's Resource Manager 一般而言,Azure 和云计算的初学者,如何设置“模板”来启动特定的一组或一组自定义 VM? - Beginner to Azure and cloud computing in general, how can I set up a "template" for launching a certain set or mix of custom VMs? 设置Azure VM(资源管理器)时如何保留IP - How to reserve IP when provisioning Azure VM (resource manager) Azure Linux VM(资源管理器)上的端点选项卡? - Endpoints tab on an Azure Linux VM (resource manager)? 我无法在 VM 之间连接 ssh - I can't connect ssh between VMs 如何使用Azure CLI资源管理部署模式创建终结点(入站安全规则)? - How can I create endpoints (Inbound security rules), using Azure CLI Resource Management deployment mode? 如何查看网站发出的 DNS 请求? - How can I see what DNS requests are being made by a website? 如何在Chef Opscode中使用idempotency来执行一次mount资源? - How can I use idempotency in Chef Opscode to execute a mount resource only once?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM