Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

18.5. Enhancing Remote Management of Virtual Machines with NSS


In Red Hat Enterprise Linux 7.3 and later, you can use the libvirt Name Service Switch (NSS) module to make it easier to connect to guests with SSH, TLS, SSL, as well as other remote login services. In addition, the module also benefits utilities that use host name translation, such as ping.
To be able to use this functionality, install the libvirt-nss package:
# yum install libvirt-nss
Copy to Clipboard Toggle word wrap

Note

If installing libvirt-nss fails, make sure that the Optional repository for Red Hat Enterprise Linux is enabled. For instructions, see the System Administrator's Guide.
Finally, enable the module by adding libvirt_guest to the hosts line of the /etc/nsswitch.conf file, for example as follows:
passwd:      compat
shadow:      compat
group:       compat
hosts:       files libvirt_guest dns
...
Copy to Clipboard Toggle word wrap
The order in which modules are listed on the hosts line determines the order in which these modules are consulted to find the specified remote guest. As a result, libvirt's NSS module is added to modules that translate host domain names to IP addresses. This for example enables connecting to a remote guest in NAT mode without setting a static IP address and only using the guest's name:
# ssh root@guestname
root@guestname's password:
Last login: Thu Aug 10 09:12:31 2017 from 192.168.122.1
[root@guestname ~]#
Copy to Clipboard Toggle word wrap

Note

If you do not know the guest's name, you can obtain it by using the virsh list --all command.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat