Categories: Uncategorized

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

and

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.

 

Alessandro Oppo

Alessandro è un milanese che vorrebbe scappare da Milano, è appassionato di informatica ma vorrebbe vivere senza telefono, è un artigiano eppure vorrebbe robotizzare tutto, impara una cosa e già vorrebbe studiare dell’altro. Autodidatta da sempre, gli piace sbattere la testa finché tutto non funziona come vuole lui, spesso ci riesce anche! Visita il suo blog personale alexoppo.com Il motto che si ripete dentro la testa è: “Se ci sono riusciti gli altri ci posso riuscire anche io”.

Share
Published by
Alessandro Oppo
Tags: ProxmoxVMVPS

Recent Posts

Ponti sospesi: cosa abbiamo sbagliato? cosa si potrebbe fare?

Poco prima di Natale ho avuto la fortuna di poter partecipare a un evento chiamato…

4 mesi ago

Siamo quel che facciamo? – racconto breve

Armando quel giorno era particolarmente stanco. Tutto, per quanto andasse bene, sembrava metterlo sotto pressione.…

9 mesi ago

Il limite è sempre la mente – Racconto breve

Armando guardò l’orologio e vide il proprio riflesso sul quadrante bianco. Il riflesso però non…

10 mesi ago

L’ultimo giorno del carcere – Racconto breve

I muri sono muri, lo sono sempre, anche quando le porte sono aperte. Era la…

10 mesi ago

Riflessioni sul carcere

Pochi di noi riflettono sull’esistenza nella nostra società del carcere. Il carcere è la concretizzazione…

12 mesi ago

Come dovremmo dialogare secondo me

Spesso intraprendiamo delle conversazioni e delle chiacchierate piuttosto inconsapevolmente. Voglio dire che non siamo molto…

12 mesi ago