cloud-init does not use search domain as fqdn

jimmymcheung

New Member
Apr 21, 2023
23
1
3
I have a VM provisioned with qcow2 image, and have set in the cloud-init a search domain. However, the cloud init is using vmName + search domain as the FQDN, which is not as expected. An earlier VM created with the same image and cloud-init settings (except with a different search domain) produces current FQDN. Does anyone have an idea on how to fix this?

For clarity, here is list of current/expected setting:
Code:
new VM (current: wrong config):
host name: vm-1
search domain: vm-1.node1.pve.example.com
fqdn: vm-1.vm-1.node1.pve.example.com

new VM (expected: correct config):
host name: vm-1
search domain: vm-1.node1.pve.example.com
fqdn: vm-1.node1.pve.example.com

existing VM from same template (current: correct config):
host name: vm-0
search domain: vm-0.pve.example.com
fqdn: vm-1.pve.example.com

I understand that search domain is not FQDN, but since my research on how to specify FQDN with cloud-init does not come a result, and since the previous VM that take search domain as FQDN (maybe a bug?), I was expecting a consistent behaviour.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!