我应该给我的Azure虚拟机什么DNS名称标签? [英] What DNS Name Label should I give my Azure Virtual Machine?
问题描述
在我的不断努力来包装我身边的Azure的新的资源组模型头部(见previous问题<一href=\"http://stackoverflow.com/questions/35163948/associate-a-public-ip-in-an-azure-resource-group-to-a-web-app\">here和<一个href=\"http://stackoverflow.com/questions/35183153/point-ip-address-to-azure-resource-group-web-app/35183280?noredirect=1#comment58138836_35183280\">here),我现在想创建一个将用作Web服务器的新的虚拟机。
In my ongoing effort to wrap my head around Azure's new Resource Group model (see previous questions here and here), I am now trying to create a new Virtual Machine that will be used as a web server.
我有你的问题:
问题一:
假设我最终想要这个VM主办的网站woodswild.com,什么DNS名称标签应该我给这个虚拟机?有关系吗?我只知道可以肯定的是,它必须是全球唯一的。是否需要反思我要承载域(woodswild.com)?
Assuming I eventually want this VM to host the website woodswild.com, what DNS Name Label should I give this VM? Does it matter? All I know for sure is that it needs to be globally unique. Does it need to reflect the domain I want to host (woodswild.com)?
问二:
我甚需要在所有设置DNS名称?
Do I even need to set the DNS name at all?
问题三:
和,现在我已经创造了它,我还可以改变从无的DNS名称标签的东西?如果是这样,怎么样?
And, now that I've already created it, can I still change the DNS Name Label from "none" to something? And if so, how?
推荐答案
有没有要求在所有要么有一个DNS名称,或者有一个是什么关系要设置什么了。我有我使用创建一个从GUID的脚本!
There is no requirement at all to either have a DNS name, or to have one that is anything to do with what you are setting up. I have a script that I use that creates one from a GUID!
这如下分配设置天青通常的过程。
This follows the usual process of assigning a setting to Azure.
- 获取-的东西,它分配给一个变量。
- 更改变量的属性,通过给一些其他的价值。
- 写使用Set-东西cmdlet中的变化Azure上。
在此情况下,它是一个有点复杂,因为我们希望最终的结构看起来像这样
in this case it is a little complicated since the ultimate structure we want looks like this
DnsSettings : {
"DomainNameLabel": "mytestdnsname",
"Fqdn": "mytestdnsname.westeurope.cloudapp.azure.com"
}
presuming我们创建一个像这样的PIP
presuming we created an PIP like this
New-AzureRmPublicIpAddress -Name test01PIP -ResourceGroupName test01 `
-AllocationMethod Dynamic -Location westeurope
的完全限定域名自动设置,所以我们只需要设置DomainNameLabel这是我们做的这个样子,
The fully qualified domain name is set automatically, so we just need to set the DomainNameLabel which we do like this,
$ip =get-AzureRmPublicIpAddress -Name test01PIP -ResourceGroupName test01 [1]
$ip.DnsSettings += @{DomainNameLabel = "mytestdnsname"} [2]
Set-AzureRmPublicIpAddress -PublicIpAddress $ip [3]
这篇关于我应该给我的Azure虚拟机什么DNS名称标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!