Bug 1565746
Summary: | Hostname not set by cloud-init on Red Hat Enterprise Linux 7.5 KVM Guest Image | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Nick Curry <ncurry> |
Component: | cloud-init | Assignee: | Ryan McCabe <rmccabe> |
Status: | CLOSED NOTABUG | QA Contact: | xiachen |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.5 | CC: | eterrell, huzhao, jeannette9728miller, jgreguske, ncurry, ribarry, xiachen, yacao, yuxisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-05-09 08:30:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nick Curry
2018-04-10 16:27:54 UTC
Using local-hostname instead of hostname in user-data fixed the issue According cloud-init doc, https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html for NoCloud data source, the permitted key is h or local-hostname. so using local-hostname instead of hostname in user-data fixed the issue. Close this bug as NOTABUG. The issue you’re describing with cloud-init not setting the hostname properly on a Red Hat Enterprise Linux 7.5 KVM Guest Image is a known problem. The bug report indicates that the status is CLOSED NOTABUG, which typically means that the behavior experienced is not considered a bug by the developers or it could not be reproduced. The version of cloud-init you’re using (0.7.9-24.el7.x86_64) might have known issues with setting the hostname. Check if there’s an updated version available and consider updating it. Make sure that the user-data and meta-data files are correctly configured. The meta-data file should contain a line like hostname: desired-hostname to set the hostname. The logs you’ve provided indicate that cloud-init is running its modules. Look for any errors or warnings in the logs that might point to why the hostname isn’t being set. If cloud-init fails to set the hostname, you can manually set it by editing the /etc/hostname file and then running hostnamectl set-hostname desired-hostname. Remember to replace desired-hostname with the actual hostname you want to set for your virtual machine. |