Add loopback network device and localhost entry to /etc/hosts for VM tests.