简体   繁体   English

没有公共DNS的Azure VM

[英]Azure VM with no public DNS

I am trying to spinup Azure VM with no publick DNS using ARM template simple Linux VM 我正在尝试使用ARM模板简单Linux VM来启动没有publick DNS的Azure VM

But I want dont want Publick DNS on this VM just private IP. 但是我不希望此VM上的Publick DNS仅是私有IP。 I tried to remove following part related to public IP 我试图删除以下与公共IP相关的部分

"publicIPAddressName": "myPublicIP",
"publicIPAddressType": "Dynamic",

and

{
  "apiVersion": "[variables('apiVersion')]",
  "type": "Microsoft.Network/publicIPAddresses",
  "name": "[variables('publicIPAddressName')]",
  "location": "[resourceGroup().location]",
  "properties": {
    "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
    "dnsSettings": {
      "domainNameLabel": "[parameters('dnsLabelPrefix')]"
    }
  }
},

but i ran into trouble when running the template. 但是我在运行模板时遇到了麻烦。

So would appreciate if anyone know how to do this ? 因此,如果有人知道如何执行此操作,将不胜感激?

Thanks 谢谢

The networkInterface (NIC) resource depends on the publicIPAdress resource you deleted. networkInterface(NIC)资源取决于您删除的publicIPAdress资源。 So, when you deleted the publicIPAddress resource that broke the dependency chain. 因此,当您删除破坏依赖链的publicIPAddress资源时。

To fix this, you need to remove the references to it in the networkInterface resource as highlighted in red here. 要解决此问题,您需要在networkInterface资源中删除对其的引用,此处以红色突出显示。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM