mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/vm_networking/virt-accessing-vm-internal-fqdn.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="virt-connecting-vm-internal-fqdn_{context}"]
|
|
= Connecting to a virtual machine by using its internal FQDN
|
|
|
|
[role="_abstract"]
|
|
You can connect to a virtual machine (VM) by using its internal fully qualified domain name (FQDN).
|
|
|
|
.Prerequisites
|
|
* You have installed the `virtctl` tool.
|
|
* You have identified the internal FQDN of the VM from the web console or by mapping the VM to a headless service. The internal FQDN has the format `<vm.spec.hostname>.<vm.spec.subdomain>.<vm.metadata.namespace>.svc.cluster.local`.
|
|
|
|
|
|
.Procedure
|
|
|
|
. Connect to the VM console by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ virtctl console vm-fedora
|
|
----
|
|
|
|
. To connect to the VM by using the requested FQDN, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ping myvm.mysubdomain.<namespace>.svc.cluster.local
|
|
----
|
|
+
|
|
Example output:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
PING myvm.mysubdomain.default.svc.cluster.local (10.244.0.57) 56(84) bytes of data.
|
|
64 bytes from myvm.mysubdomain.default.svc.cluster.local (10.244.0.57): icmp_seq=1 ttl=64 time=0.029 ms
|
|
----
|
|
+
|
|
In the preceding example, the DNS entry for `myvm.mysubdomain.default.svc.cluster.local` points to `10.244.0.57`, which is the cluster IP address that is currently assigned to the VM.
|
|
|