iface enp5s0 inet manual
auto vmbr0
iface vmbr0 inet dhcp
bridge-ports enp5s0
bridge-stp off
bridge-fd 0
In order to set the DHCP on your Proxmox VE, you have to edit the `/etc/network/interfaces` file in the above example, you have also to change the interface nameI haven't found a way to do this, my GUI allow only static IP.
How can I do that please ?
ifreload -a
` command in order to take the effect.Hi all,
I'm trying to change static IP of my PVE, to dynamic (a permanent dynamic from DHCP server with PVE mac).
I haven't found a way to do this, my GUI allow only static IP.
How can I do that please ?
thanks a lot
I like the auto script of updating /etc/hosts. Usually I will do it via the rc.local, but his mechanism is even better (using the dhcp hook)Not sure if things have changed since the above post, but if I comment out the hardcoded ip in `/etc/hosts` then Proxmox services will not start after a reboot. However, this post has a script to change the hardcoding dynamically whenever the IP address changes, and that worked for me.
there's a high chance to forget that the IP is configured via DHCP
I would really love to see the proxmox team adopt these small quality-of-life changes that they may believe are unnecessary, but every other hypervisor in existence supports out of the box. We (the proxmox community) can either think we are right and all other hypervisors are wrong, or we can try to understand that there is probably a very good reason why users should be able to manage the hypervisor's IP address through the hypervisor's config page and why we should be able to set things to DHCP should we want them to be that way.
I think the logic should change to clustering, make static IPs required for clusters to avoid issues - but for standalone hosts, might be an easy thing to do. The issue really goes beyond dhcp, just changing the IP address alone is something we can't currently do through GUI.I suspect the major issue PVE has with this is the philosophy of all nodes being equal and no control panel "node". But it only works in theory. At the end of the day, when your cluster falls apart, you need some tooling (and Proxmox appear to actively avoid to provide anything like that) that puts it back together. You cannot distribute changes properly if the distributed state machine fell apart till you get it working, for that you need to update the corosync configuration uniformly and kickstart it, but you cannot do it over the corosync messages, obviously.
When you apply this logic to other centrally managed concept like DHCP + DNS, you get the idea. The last option is that Proxmox calculated how likely users are to come with e.g. misconfigured DHCP and put it on their shoulders to troubleshoot, so they rather actively discourage it out of convenience of their own support load.
NB When you look at the tutorial linked, there really isn't much that one has to do to have it working well, it's just putting back dhcp and hostnames where PVE scripting would get you populated resolved IP addresses.
I think the logic should change to clustering, make static IPs required for clusters to avoid issues - but for standalone hosts, might be an easy thing to do. The issue really goes beyond dhcp, just changing the IP address alone is something we can't currently do through GUI.
ps: maybe I'm just done, but i couldn't get a standalone node to work on dhcp using the tutorial above,
I can ssh fine into the machine, but the pve web ui never loads
I followed this and ended up locking myself out, luckily it was in a virtual proxmox test lab.Not sure if things have changed since the above post, but if I comment out the hardcoded ip in `/etc/hosts` then Proxmox services will not start after a reboot. However, this post has a script to change the hardcoding dynamically whenever the IP address changes, and that worked for me.
I followed this and ended up locking myself out, luckily it was in a virtual proxmox test lab.
i reverted everything to as it was before and still couldnt get back in
journalctl -u pve-cluster
) about hostname not resolving, it is because, well, it is not resolving. You can have it resolve it multiple ways, but the standard install PVE relies on putting a static entry into /etc/hosts
(which is not how name resolution should happen though). It never changes, unless you change it or do something extra (e.g. DNS and proper resolving configuration, e.g. nsswitch.conf
) to make it resolve. And do note that corosync.conf
needs to amended as well if you have a cluster.hostname --ip-address
would be great if I could get DHCP working for this portable lab
Hi thanks for the aboveWhen you boot and you see complaints (checkjournalctl -u pve-cluster
) about hostname not resolving, it is because, well, it is not resolving. You can have it resolve it multiple ways, but the standard install PVE relies on putting a static entry into/etc/hosts
(which is not how name resolution should happen though). It never changes, unless you change it or do something extra (e.g. DNS and proper resolving configuration, e.g.nsswitch.conf
) to make it resolve. And do note thatcorosync.conf
needs to amended as well if you have a cluster.
A quick check can be done with:hostname --ip-address
This needs to show some other than loopback address.
I don't want to be pushing my tutorial (why not search before asking), but you can get exactly that:
https://forum.proxmox.com/threads/dhcp-cluster-no-static-configuration-auto-install.154780/
Hi thanks for the above
I did check out your link before posing my message and as it stated cluster I wasn't sure if it was aimed at a solo node (more so if I can achieve what I need without setting PVE on top of Debian that would also be preferred)
Hi thanks for the above
I did check out your link before posing my message and as it stated cluster I wasn't sure if it was aimed at a solo node (more so if I can achieve what I need without setting PVE on top of Debian that would also be preferred)
Thank you for thisAlright, here is something for SINGLE node ONLY: https://forum.proxmox.com/threads/dhcp-single-node-install-only.155125/
ok do going for round three... i had cluster services turned offThank you for this
will have a pop at it now (I did try doing it from the original link but must have done something wrong lol)
this new link does look slightly different though so fingers crossed I can make it work