Re: Set hostname of guest during installation time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27. 3. 2020 19:23, john doe wrote:
> Okay, I have installed the pluging, do you mind explaning how this
> should work?:
> 
> $ grep host /etc/ns*
> hosts:          files libvirt_guest dns
> 
> 
> If I'm correct, following your example, I should be able to do:
> 
>  $ host try06
> 
> What am I missing.

'host' does DNS directly, regardless of nsswitch.conf. That's not how
majority of SW work. Try:

  getent hosts try06

or:

  ssh try06

The majority will use gethostbyname() which will consult the
nsswitch.conf and use modules defined there. In your case, the
/etc/hosts will be consulted first, then libvirt_guest and DNS is used
only if everything else failed. You can verify that 'host' does DNS
directly by trying a hostname from /etc/hosts. It will give an error
even though getent won't.

Michal




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux