This blog is hosted on a quadcore VPS with 8gb of RAM. The price I pay is 5€ monthly, forever. Link to Contabo with my referral code.

proxmox how to clone a vm 1024 1

ProxMox VMs have the same local IP. Quick fix

The first time I used Proxmox I had problems because my new cloned virtual machines where all taking the same private IP address from the DHCP server.

I couldn’t connect via ssh or anything else, so I’ve looked on the Proxmox Wiki, discovering that I have to follow some steps.

Unfortunately the last step that I’m describing here was not in the Wiki.

Change name of the VM

Login to the new clone VM

sudo nano /etc/hostname


sudo nano /etc/hosts

Change Mac address

Shut down the VM and from the Proxmox admin panel remove the network card, then add it again. The phisical address will change.

Change SSH keys

Turn on the VM and run.

sudo rm /etc/ssh/ssh_host_*

dpkg-reconfigure openssh-server

Change machine id

This step was not described in the Wiki and I had to google a little bit, luckily I’ve found this post on the Proxmox forum.

sudo rm /etc/machine-id

sudo systemd-machine-id-setup

That’s all! Now your DHCP server should give a different IP to all your different VMs.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.