How to give a VM a static ipaddress

mr_2023user

New Member
Jun 22, 2023
9
1
1
I have 1 VM running in ProxMox VE 8 and it has an auto created ip-address. Now I need that address to be changed into an static address so it can replace an machine which is now offline. Only part I can found deals with a Mac address. But where or how can I change the ip-address of a VM?
Scherm­afbeelding 2023-06-25 om 16.44.43.png

Scherm­afbeelding 2023-06-25 om 16.48.03.png
 
You change that IP from inside the guest OS. So in your case from the HomeAssistent webUI at Settings -> System -> Network -> configure Network Interfaces -> enpos18 -> IPv4 -> Static
 
Last edited:
So In this screen?
So I have to select the option Create > LinuxBridge ?
But only get the error as below Also tried to have >enpos18 or any other description? So what should I put here?
Scherm­afbeelding 2023-06-25 om 17.03.51.png
Scherm­afbeelding 2023-06-25 om 17.08.27.pngScherm­afbeelding 2023-06-25 om 17.16.45.png
 
Ok great. Now I understand, I was not aware of this part :) in HA.

But what I want to have is a different ip-adress than the one created by ProxMox? Now it is 192.168.0.111 but I need 192.168.0.111 Where do I change that? I asume it has to be done in Proxmox.
I'm also planning some other VM (not HA) which also need to have their own fixed ip address. They will replace an existing machine which has depencies to or from it with the fixed ip address.
 
Last edited:
Like I already said, you need to set that IP inside the guest OS. PVE is only providing the virtual hardware. How to use that hardware is totally up to the guest OS that is running inside the VM, as this is a software thing and PVE only provides the virtual hardware.
PVE can only tell the guestOS what IP to use when working with cloud-init, but then you need special cloud-init compatible images.
 
Last edited:
So to get it clear for me (and others). If I install a Debian iso in a VM. Then I have to go into that debian when it is up and running and change the ip address from there? So the DHCP (ip-address) is more or less provided by ProxMox and not taken from the network-router.

In the HA webUi I can just replace the ip-address from your example into the desired one I need. This is something which normally can be done from within a terminal on linux then. Now I see :)
 
Last edited:
  • Like
Reactions: Redders
So to get it clear for me (and others). If I install a debian iso in a VM. Then I have to go into that debian when it is up and running and change the ip addres from there?
Right.
So the DHCP (ip-address) is more or less provided by ProxMox and not taken from the network-router.
PVE isn't working as a DHCP server and isn't providing any IPs to DHCP clients. If your guestOS is set up to use DHCP you will have to change the persistent IP assignment at the machine that is running your DHCP server (so probably your router). When working with static IPs you will have to boot up your VM and change the static IP from within the guest OS.
 
Ok. I will get there :)

So this, I now change into the second one and that should work then. Will the IPv6 be adapted automatic or does that need some manual work?
Scherm­afbeelding 2023-06-25 om 19.14.19.pngScherm­afbeelding 2023-06-25 om 19.15.27.png
 

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!