[SOLVED] NIC (Hot)Swap

D0K

Member
Jun 16, 2022
12
4
8
Hi there,

m wondering if anyone have tried swapping NIC's on a running proxmox datacenter host machine ?

if so do you then know if it's possible to "just change the names" in /etc/networking/interfaces?

and then restart the network service?

This is on a running environment and people depend on this so it has to be done quickly :) .

what ive done so far.
- inserted 10G NIC
- reboot host machine
- noticed old and new mac address and interface names (in case anything goes wrong and i have to go back)
 
Last edited:
hi,

if so do you then know if it's possible to "just change the names" in /etc/networking/interfaces?

and then restart the network service?
should work in theory. you can also do ifreload -a after changing the network interfaces file.

- noticed old and new mac address and interface names (in case anything goes wrong and i have to go back)
you can make a backup, cp /etc/network/interfaces /etc/network/interfaces.bak and just change it back to the original if you realize something went wrong.
 
  • Like
Reactions: D0K
thank you for the quick reply,

i'll try it out, :)

Have a nice day.

kind regards.
 
for future views on this post, this solution works without a problem :-)

Kind Regards.
 
  • Like
Reactions: oguz
you can make a backup, cp /etc/network/interfaces /etc/network/interfaces.bak and just change it back to the original if you realize something went wrong.

Hi,

Even beter if you are remote. Create a scheduler who will be executed let say NOW+10 min with a script(see below) who will revert your configuration if your config will be broken(so no network acces = "cut the branch from below your feet - sentence from my country")

cat /etc/network/interfaces.back > /etc/network/interfaces /sbin/ifreload -a /usr/bin/mail -s "Config reverted from backup file" gigi@yourdomain.tld < /dev/null

So, if your new config is OK, then remove the scheduler script. If not, then wait for the mail, and when is come, try again a better config who will not
broke your server(could be used for ANY other critical new and untested config).



Good luck / Bafta!
 
  • Like
Reactions: D0K