Using the shared drive with a custom DNS server

If you’re using a manual network or providing DNS services to VMs on an automatic network, shortcut links to the shared drive or the network path \\gw\shared may not work correctly.

To fix this, you can either:

  • Connect to the shared drive using the network gateway IP address (instead of \\gw\shared)

    or

  • Restore the \\gw\shared alias by modifying the guest OS network settings or DNS hosts file.

For general information about using the shared drive, see Adding and sharing files with the shared drive.

Contents

Troubleshooting

To test whether the shared drive connection issue is caused by the DNS:

  1. Within your Windows VM, click Start > Run.
  2. Type \\Your.Gateway.IP.Address\shared. For example:

     \\10.0.0.254\shared
    

    If this command resolves to the shared drive, then the issue is caused by the current DNS configuration.

    To locate the network gateway IP address, see Finding the network gateway IP address.

  3. To confirm the issue, replace the gateway IP address with gw, which will most likely fail to resolve:

     \\gw\shared
    

You can continue to use the gateway IP address to connect to the shared drive, or you can edit the VM or DNS to recognize the \\gw\shared alias (see below).

Options for restoring the \\gw\shared alias

There are several options for getting a VM on a custom DNS server to recognize \\gw\shared as the shared drive address.

Option

Instructions

List the gateway IP address as the alternate DNS server in the VM operating system

If you’re providing your own DNS, you can list the gateway IP address as the alternate DNS server in the VM operating system.

For example, to list the gateway address as the alternate DNS server in Windows 2008 R2
  1. Right-click Network and select Properties.
  2. Click Change Adapter Settings.
  3. Right-click the network adapter you want to change, and select Properties.
  4. Select TCP/IPv4 and click Properties.

If the VM is also configured to use a static IP address, set the primary DNS suffix of the VM.

For example, to specify the primary DNS suffix in Windows 2008 R2
  1. Right-click Computer and select Properties.
  2. In the Computer Name, Domain, and Workgroup Settings section, click Change Settings.
  3. On the Computer Name tab, click Change.
  4. In the Computer Name/Domain Changes pop-up, click More.
  5. Set the Primary DNS suffix of this computer to be that of the domain of your network in Skytap—the most common defaults are “example.com” or “test.net”.

Modify the VM hosts file to include the gateway IP address

If you’re providing your own DNS, you can modify the hosts file in the VM to include an entry that resolves the gateway IP address (for example, 10.0.0.254) to gw.

For example, to specify the gateway IP address in Windows 2008 R2
  • Open the following file in a plain text editor such as Notepad:

    C:\WINDOWS\system32\drivers\etc\hosts

  • Add the following entry to this file: Your.Gateway.IP.Address gw

    For example:

    10.0.0.254 gw

Add a Host A record to the DNS server

If you’re providing your own DNS, you can add a Host A record to the DNS server. This option eliminates the need to edit individual host files for every VM. After adding the Host A record, flush the DNS cache on each VM.

If you replicate the DNS server, you may need to change the hostname of the Host A record.