Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have one physical server running kvm with 4 vms on it. For each vm i used an own IP address. Now my colocation provider is changing all IPs. What is the update strategy? Log in on each vm and re-configure /etc/network/interface ? Then change the IP of the physical server and reboot?

share|improve this question

1 Answer 1

It should not be necessary to reboot to reconfigure the IP addresses. You could try:

  • Add new address to the server with appropriate routing.
  • Add new address to the VMs, or replace the addresses on the VMs. (This is only necessary if the server is not NATing the addresses for the VMs. If they have private IP addresses leave them as is.)
  • Restart any services which are only listening on the old address.
  • Change the default gateway on the server once that address is fully routeable by your colocation provider.
  • Change the default gateway on the VMs.
  • Remove the old addresses from the VMs once all connections on those addresses have closed. (May require service restarts in some cases.)
  • Remove the old address from the server.

You can change /etc/network/interfaces and just use ifup and ifdown to configure and unconfigure the addresses. Using the command nohup /etc/init.d/network/restart 2>&1 is a more robust restart.

If you have a separate management port or are working from the console you can skip the nohup in the above command. Using ifdown on the primary configuration (eth0) should only be done if you are not connected over that interface.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.