Do not renew IP after cloned from VM template

Hi,
you probably have the IP of your VM hard-coded in the VM. If it's a Linux VM, you can most likely find the configuration at /etc/network/interfaces. If you want the IP to be dynamic, you could change the template to use DHCP per default and set up an DHCP server, if there isn't already one in your network.
 
The bridge network itself isn't that relevant here, the important part is inside the vm/template. Could you post the network config of the host system and a guest that was created from the template?
 
I see the mac address is new but the same IP of original VM.
I am using lastest version
Did you create the template by properly cleaning up the VM, i.e. releasing the IP, cleaning all cached configuration, etc.

This has less to do with PVE and more with how template was prepared and particular DHCP server behavior/configuration.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
your local vmbr acts as a full fledged switch, including caching its MACL tables. log in to your vm using the console, and manually issue dhclient

if that doesnt work, set a manual ip and ping the router; once you have a positive response you can switch back to dhcp.
 
i only install new Ubuntu 22.04 , apt update && apt upgrade . that is all steps
do i need to clear cache DHCP before converting VM to template.
I dont know all the steps you took to install it. You can search for "golden image" for some helpful tips, ie:
https://github.com/mvallim/cloud-image-ubuntu-from-scratch

Or use a pre-built Cloud Image.
I suspect once DHCP re-issue the IP, its now on a time-defined lease. Also releasing and renewing will get you the next IP in line, which is probably the one you used.
Is the IP already in-use on the network? Ideally, DHCP server will probe and avoid giving out duplicate IP. Again, this depends on your setup, of which we know nothing about.

As a test, you can shutdown the cloned VM. Remove the NIC and add a new one. Boot it up, configure for DHCP and see what happens.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
I dont know all the steps you took to install it. You can search for "golden image" for some helpful tips, ie:
https://github.com/mvallim/cloud-image-ubuntu-from-scratch

Or use a pre-built Cloud Image.
I suspect once DHCP re-issue the IP, its now on a time-defined lease. Also releasing and renewing will get you the next IP in line, which is probably the one you used.
Is the IP already in-use on the network? Ideally, DHCP server will probe and avoid giving out duplicate IP. Again, this depends on your setup, of which we know nothing about.

As a test, you can shutdown the cloned VM. Remove the NIC and add a new one. Boot it up, configure for DHCP and see what happens.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I use ISO image file to install. I am in doubt Proxmox create new MAC Address on new VM but it still cache in Proxmox is MAC Address of original VM
 
i try set static ip When i sudo netplan apply
it show this message but i still ping ok
Warnings are not errors. The option can be depreciated and still supported for a while, eventually it will get removed. The message tells you to update your config file to new option name, so when it gets removed you wont be left without network.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
i was found out root case this issue, DHCP need machine-id to assign IP, so you need to reset new one

sudo rm /etc/machine-id
sudo systemd-machine-id-setup
sudo reboot


It should works correctly here
 
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!