You need to replace a physical server with a VM without changing its IP or hostname. Plan the cutover.
IntermediateScenarioMigrations, performance and fleet operations
Answer
Situation read → Build the new host with a temporary IP, then take over the identity.
What I'd do →
- Build the VM with a temporary IP, install and configure via Ansible.
- Sync data (two-pass rsync).
- Window: stop services on the old server, final sync, shut the old server down (or change its IP).
- Reconfigure the VM with the original IP and hostname, restart networking.
- Clear stale ARP on the gateway if needed:
arping -U -I eth0 10.0.1.50(gratuitous ARP). - Run smoke tests; keep the old box powered off but intact.
Why → Clients keep working without DNS or config changes.
Interview tip → Mention SSH host keys: copy the old ones over or users get a "host key changed" warning.
More on Migrations, performance and fleet operations
You must migrate 2 TB of application data from an old server to a new one with less than 5 minutes of downtime. How?IntermediateThe new server has different UIDs for the same users than the old one. What breaks during migration and how do you handle it?IntermediateA server is "slow" according to users. What is your first 60 seconds of investigation?BeginnerYour team must capacity-plan for a server whose disk grows 4% per week. How do you predict when it fills?IntermediateMemory usage on a server shows 95% used but the app is fine. A manager is worried. How do you explain and verify?BeginnerYou need to set up central logging for 200 Linux servers. Design it.Intermediate