Hard to say what's causing this!? Is any of the powered off VM's involved for networking, e.g. Firewall, Router, ...?
Anyway, I would replace the HDD with the host powered on (as mentioned earlier). This way the controller will definitely recognize the replacement properly. It shouldn't be an issue with your RAID 1+0 because the majority (3 disks) are still healthy, but I had a customer who once replaced a RAID 1 disk with the host powered off and what happened was that the spare disk was synchronized to the healthy disk, effectively wiping all data.
For replacing the battery you should certainly shut down the host and - recommended - disconnect power cords before opening the server for your own safety.
André