# Using VM Names as DNS Names

When you start a virtual machine operating in the [shared](https://download.parallels.com/desktop/v19/docs/en_US/Parallels%20Desktop%20User's%20Guide/33341.htm) or [host-only](https://download.parallels.com/desktop/v19/docs/en_US/Parallels%20Desktop%20User's%20Guide/33342.htm) networking mode, and it gets an IP address assigned via DHCP, the virtual machine gets registered in the macOS *etc/hosts* file, and you can use its name to connect from the host operating system or other virtual machines operating in the [shared](https://download.parallels.com/desktop/v19/docs/en_US/Parallels%20Desktop%20User's%20Guide/33341.htm) or [host-only](https://download.parallels.com/desktop/v19/docs/en_US/Parallels%20Desktop%20User's%20Guide/33342.htm) networking mode.

For example, after starting such a virtual machine, your *etc/hosts* file may look as follows:

```
10.211.55.3     windows-11.shared windows-11 #prl_hostonly shared
```

You can use the virtual machine name (*windows-11.shared*) to connect to this virtual machine. For example, if you execute the following command in the macOS Terminal:

```
ping windows-11.shared
```

, you will start pinging 10.211.55.3.

When such a virtual machine is shut down, its registration entry is removed from the *etc/hosts* file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/parallels-desktop-developers-guide/software-development-specific-functions-of-parallels-desktop/using-vm-names-as-dns-names.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
