[SOLVED] Proxmox boot with the hostname from template


New Member
Jul 16, 2023

I have created a template with the commands

178 apt-get install cloud-init
179 ls
180 reboot
181 ls
182 wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
183 qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
184 qm set 9000 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img
185 qm set 9000 --ide2 local-lvm:cloudinit
186 qm set 9000 --boot order=scsi0
187 qm set 9000 --serial0 socket --vga serial0
188 qm template 9000
189 qm clone 9000 123 --name ubuntu2
190 ls

after reboot

the command ls /etc/pve is empty

root@VM9000:~# ls -saltr /etc/pve
total 8
4 drwxr-xr-x 2 root root 4096 Apr 18 00:05 .
4 drwxr-xr-x 88 root root 4096 Jul 16 11:35 ..

Do you have any idea what happened exactly?
The normal hostname is pve01

root@VM9000:~# cat /etc/hosts
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
# VM9000 VM9000 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

root@VM9000:~# cat /etc/hostname

I'm trying the change with hostnamectl set-hostname pve01 the hostname change but after reboot always VM9000

Some help would be appreciated...
Last edited:
it appears you installed cloud-init on hypervisor, which would be a mistake. If you did - remove it.
The cloud-image already contains cloud-init.
I am not sure what else you may have broken, its not clear what or why you are rebooting. You can try to clean things up and recover, but if your system does not contain important data I would advise to start fresh and be more careful.

Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Thank you
I try to uninstall cloud-init (not solve the issue)
for do the backup I have changed hosts and remove VM9000, add ip and normal hostname and 'hostnamectl set-hostname {HOSTNAME}'
restart pve* service and pve-* service after that the gui is up, I have do bakcups all servers.
use scp for save.
reinstall promox
and go :)


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!