Seite 1 von 2

DNS/DHCP setup for deploying new computers?

Verfasst: 03 Nov 2017, 22:20
von ttblum
It looks like the opsi PXE client needs the computer's DNS name to match it's IP address.

However, when I have a brand new computer it doesn't have any DNS records yet.

I've configured my router to register DHCP clients in DNS, but the opsi PXE clients all identify themselves as 'opsi-client'. This may not work for deploying many new computers at once if they all have the same name.

Is there a better way I should be doing this?

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 04 Nov 2017, 20:46
von m.radtke
Hi
easy way:
Cant you enter the client into the DNS before you deploy them?

Less easy way:
Use the client netboot CD to register the client to the opsi server.

Cheers
Mathias

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 05 Nov 2017, 17:07
von uncle_scrooge
@Mathias
This isn't just a DNS issue.
If one boots from CD or ISO he will be presented with a mask for setting IP-address, gateway, whatever. And the client name.
But if you boot the current bootcd image from within the PXE menu this mask is missing. Leaving you unable to change the client name.
And the client you just started gets registered as 'opsi client' in both DNS and OPSI.
Would consider it a bug. Or a major annoyance, if you like.

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 11:45
von n.wenselowski
Hi,

uncle_scrooge hat geschrieben:@Mathias
If one boots from CD or ISO he will be presented with a mask for setting IP-address, gateway, whatever. And the client name.
But if you boot the current bootcd image from within the PXE menu this mask is missing. Leaving you unable to change the client name.
And the client you just started gets registered as 'opsi client' in both DNS and OPSI.
Would consider it a bug. Or a major annoyance, if you like.

Do you boot with DHCP from the CD?
If I remember correctly the mask is only shown if some information is missing.


Kind regards

Niko

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 15:29
von uncle_scrooge
Booting from CD/ISO-image always leaves the information for 'config server' empty. Neither the CD nor a DHCP server knows anything about it.
So the input mask is always displayed.

Booting the bootcd image from within the PXE menu is a different beast.
As you can see in the append line
append initrd=miniroot-x64.bz2 video=vesa:ywrap,mtrr vga=791 quiet splash --no-log console=tty1 console=ttyS0 service=https://192.100.100.223:4447/rpc
the config server is given as a parameter. If a DHCP server provides all further needed information, the initial input mask is not displayed.
Omitting 'service=https://192.100.100.223:4447/rpc' gets you to the same behaviour as booting from CD/ISO.

There should be another input mask where I would be able to change the default client name 'opsi-client'.

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 15:50
von ttblum
This is what's in my /tftpboot/linux/pxelinux.cfg/default.menu:

Code: Alles auswählen

append initrd=miniroot-x64.bz2 video=vesa:ywrap,mtrr vga=791 lang=en quiet splash --no-log console=tty1 console=ttyS0

I'll try the ISO to see if I'm able to change the hostname there.

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 16:22
von m.radtke
it shoud be

Code: Alles auswählen

append initrd=miniroot.bz2 video=vesa:ywrap,mtrr vga=791 quiet splash --no-log console=tty1 console=ttyS0 service=https://10.100.1.30:4447/rpc

the service is missing.

cant tell why

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 16:52
von ttblum
I still get the error message:

Code: Alles auswählen

Backend I/O error:  Cannot update the dhcpd configuration for client test-opsi.xxxxx.com:  ip address unknown and failed to get host by name


This is happening when I boot from PXE or from CD.

Note that I'm running the DHCP for this network on my router, and the DNS is running on my Windows server. I'm not running either dhcpd or DNS on the opsi server itself.

When I turn the machines on they don't have IP addresses assigned to them yet, so I'm not able to set DNS A records ahead of time.

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 18:04
von uncle_scrooge
That's a different one. Looks like a misconfiguration.
Please provide content of /etc/opsi/backendManager/dispatch.conf

Re: DNS/DHCP setup for deploying new computers?

Verfasst: 08 Nov 2017, 18:17
von ttblum
Ok, here is my /etc/opsi/backendManager/dispatch.conf :

Code: Alles auswählen

# -*- coding: utf-8 -*-
# = = = = = = = = = = = = = = = = = = = = = = =
# =      backend dispatch configuration       =
# = = = = = = = = = = = = = = = = = = = = = = =
#
# This file configures which methods are dispatched to which backends.
# Entries has to follow the form:
# <regular expression to match method name(s)> : <comma separated list of backend name(s)>
#
# Backend names have to match a backend configuraton file basename <backend name>.conf beneath /etc/opsi/backends.
# For every method executed on backend dispatcher the first matching regular expression will be decisive.
#
# Typical configurations:
#    file, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       .*                 : file
#
#    jsonrpc, opsipxeconfd and dhcpd backend:
#       backend_.*         : jsonrpc, opsipxeconfd, dhcpd
#       .*                 : jsonrpc
#
#    file as main backend, mysql as hw/sw invent and license management backend, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, mysql, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       license.*          : mysql
#       softwareLicense.*  : mysql
#       audit.*            : mysql
#       .*                 : file
#

backend_.*         :file, opsipxeconfd, dhcpd, mysql
host_.*            :file, opsipxeconfd, dhcpd
productOnClient_.* :file, opsipxeconfd
configState_.*     :file, opsipxeconfd

license.*:mysql
softwareLicense.*:mysql
audit.*:mysql
.*:file