Integration with Compute Cloud
You can assign domain names (FQDNs) to VMs as soon as you create them in Compute Cloud.
To add a VM to a zone when creating it, select the zone you need and set a domain name under DNS settings for internal addresses of Network settings. You can add multiple records, including in different zones. If you do not specify a zone, the VM will get a domain name in the standard zone of the subnet it will be connected to. For instructions on how to create VMs, see Creating a VM from a public Linux image.
For a VM's public IP address, integration with Compute Cloud is currently not supported. You can add an A record to a public zone manually after creating a VM. Learn more about how to create a record.
Automatic zone selection
If no zone is specified explicitly for a VM's additional DNS record, it will be selected automatically. To enable this, specify an FQDN with a dot at the end. In the management console, the dot is added automatically.
A DNS record is added to one of the private zones that are accessible from the VM's virtual network and are FQDN suffixes. The most specific private zone is selected based on the suitable suffix. If there are multiple suitable zones with the same domain name, one of them is selected.
For example, you specified an FQDN like
hello.world.private.
in the network settings and the following four private DNS zones are accessible from the virtual network:
- Service
.
.- Custom:
staging.
andprivate.
. Andworld.private.
.The
staging.
zone is not suitable, since thestaging.
domain name is not a suffix of thehello.world.private.
FQDN.The zones that have the appropriate suffix are
.
,private.
, andworld.private.
. As a result,world.private.
is selected as the most specific zone.
Using Cloud DNS for instance groups
When creating a VM group, the name specified in the VM template will apply to all the VMs in the group. As a result, the created records will have the same FQDNs but different IPs.
To generate unique names, you can use variables in the template. For example, if the record name is web_server_{instance.index}
, you can create records with unique names of the group's VMs. If the name is web_server_{instance.zone_id}
, you can create records common for all VMs in the same availability zone.