Proxmox
Change Node Hostname
To change the node hostname:
- Power off all VMs and containers
- SSH into the node
- Change the hostname in
/etc/hostnameand/etc/hosts - Reboot
- After reboot, the web interface will show the old name as "disconnected", and the new name appears
- SSH into the node again and go to
/etc/pve/nodes- Here you will see a folder with the new name, and a folder with the old one.
- Inside each one, there's a
lxcandqemu-serverfolder - Move the contents of
lxcfrom the old folder to the new folder - Move the contents of
qemu-serverfrom the old folder to the new folder
- Remove the folder with the old name
- Start the VMs and containers again
If you have LVM disks in use, you need to associate them to the new hostname:
- In the web interface, go to Datacenter > Storage
- Double-click your LVM disk
- On Nodes, select the new hostname
- Click OK
Enable /dev/net/tun on Container Hosts
Edit the container configuration file, usually located at /etc/pve/lxc/<container_id>.conf, and add this content:
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=fileAfter that, restart the container.
Rodrigo de Avila