[SOLVED] NIC (Hot)Swap

D0K

New Member
Jun 16, 2022
12
4
3
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

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!