Overview
Google Cloud VPC networks have an internal DNS service but do not automatically support configuring external DNS for a VM. Enterprises, however, may prefer to manage their own DNS servers and thus need to configure external DNS on migrated VMs.
Velostrata provides a way to set and control the external DNS settings of migrated VMs. To do this, you configure DNS settings in the Google Cloud project (and region) using Google Cloud project metadata. These settings are applied to new VMs as they are migrated.
When empty DNS metadata is provided (such as default-dns-servers = ""
),
DHCP overwrites the DNS configuration.
How DNS settings are applied
The DNS settings are applied as follows:
- For Windows clients, the key-value pairs are applied to all NICs as
follows:
dns-domain-name
: Replaces theDNS suffix for this connection
setting per NIC.dns-servers
: Replaces the list of DNS servers per NIC.dns-domain-suffixes
: Replaces the list of DNS suffixes per NIC.
- For Linux clients, the key-value pairs are applied to all NICs as
follows:
dns-servers
: Prepends the list of DNS servers in theresolv.conf
file.dns-domain-suffixes
: Prepends the list of DNS suffixes in theresolv.conf
file.
Configuring external DNS data on VMs in GCP
To enable external DNS on migrated VMs:
- In the Google Cloud Platform Console, go to the Metadata page for your project.
- Under Metadata, click Edit.
- In the Metadata page, add the appropriate key:value pairs. Use
one of the following sections for instructions for these deployments:
- If your VMs have a region setting, follow the instructions in Using VMs with a region setting.
- If your VMs don't have a region setting, follow the instructions in Using VMs without a region setting to use the default configuration.
Using VMs with a region setting
- If your VMs have a specific region setting, add the following key-value
pairs in the Metadata page:
- Key:
{region_name}_dns-domain-name
Value:: mydomain.com
- represents the connection-specific DNS suffix in Windows clients. - Key:
{region_name}_dns-servers
Value:: {comma separated list of IPs}
- represents the list of DNS servers. - Key:
{region_name}_dns-domain-suffixes
Values:mydomain.com, myseconddomain.com
- represents the list of DNS suffixes to add to Windows and Linux machines.
- Key:
- When you're done, click Save.
Using VMs without a region setting (default configuration)
- If your VMs don't have a specific region setting, add the following key-value
pairs in the Metadata page:
- Key:
default_dns-domain-name
Value:mydomain.com
- Key:
default_dns-servers
Value:{comma separated list of IPs}
- Key:
default_dns-domain-suffixes
Value:mydomain.com, myseconddomain.com
- Key:
- When you're done, click Save.