[PATCH] builder: templates: set "unassigned" hostname
By default the installer will set the hostname to what the DHCP returns, exposing details of the machine where make-template.ml runs. Instead, force "unassigned-hostname.unassigned-domain" as hostname, so plays nicely with the hostname setting code in virt-customize. --- builder/templates/debian.preseed | 2 +- builder/templates/ubuntu.preseed | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/templates/debian.preseed b/builder/templates/debian.preseed index 1f13eadbd..8c51fa7f9 100644 --- a/builder/templates/debian.preseed +++ b/builder/templates/debian.preseed @@ -71,7 +71,7 @@ d-i netcfg/get_domain string unassigned-domain # If you want to force a hostname, regardless of what either the DHCP # server returns or what the reverse DNS entry for the IP is, uncomment # and adjust the following line. -#d-i netcfg/hostname string somehost +d-i netcfg/hostname string unassigned-hostname.unassigned-domain # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string diff --git a/builder/templates/ubuntu.preseed b/builder/templates/ubuntu.preseed index 236e17497..595d897a6 100644 --- a/builder/templates/ubuntu.preseed +++ b/builder/templates/ubuntu.preseed @@ -47,6 +47,11 @@ d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain +# If you want to force a hostname, regardless of what either the DHCP +# server returns or what the reverse DNS entry for the IP is, uncomment +# and adjust the following line. +d-i netcfg/hostname string unassigned-hostname.unassigned-domain + # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string # The wacky dhcp hostname that some ISPs use as a password of sorts. -- 2.21.0
On Thu, Sep 26, 2019 at 04:55:11PM +0200, Pino Toscano wrote:
By default the installer will set the hostname to what the DHCP returns, exposing details of the machine where make-template.ml runs.
Instead, force "unassigned-hostname.unassigned-domain" as hostname, so plays nicely with the hostname setting code in virt-customize. --- builder/templates/debian.preseed | 2 +- builder/templates/ubuntu.preseed | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/builder/templates/debian.preseed b/builder/templates/debian.preseed index 1f13eadbd..8c51fa7f9 100644 --- a/builder/templates/debian.preseed +++ b/builder/templates/debian.preseed @@ -71,7 +71,7 @@ d-i netcfg/get_domain string unassigned-domain # If you want to force a hostname, regardless of what either the DHCP # server returns or what the reverse DNS entry for the IP is, uncomment # and adjust the following line. -#d-i netcfg/hostname string somehost +d-i netcfg/hostname string unassigned-hostname.unassigned-domain
# Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string diff --git a/builder/templates/ubuntu.preseed b/builder/templates/ubuntu.preseed index 236e17497..595d897a6 100644 --- a/builder/templates/ubuntu.preseed +++ b/builder/templates/ubuntu.preseed @@ -47,6 +47,11 @@ d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain
+# If you want to force a hostname, regardless of what either the DHCP +# server returns or what the reverse DNS entry for the IP is, uncomment +# and adjust the following line. +d-i netcfg/hostname string unassigned-hostname.unassigned-domain + # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string # The wacky dhcp hostname that some ISPs use as a password of sorts.
Yes, good idea, ACK. I've been trying to build a CentOS 8 image for a couple of days, so far without success ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
participants (2)
-
Pino Toscano -
Richard W.M. Jones