code: def _addToHosts(self, node, destinationIP=None):
          
          cmd = "echo %s %s | sudo tee --append /etc/hosts > /dev/null" % (node.privateIP, node.name)
          logger.debug("Running command %s on %s" % (cmd, destinationIP))
          if destinationIP:
              subprocess.Popen(["ssh", "-oStrictHostKeyChecking=no", "core@%s" % destinationIP, cmd])
          else:
              subprocess.Popen(cmd, shell=True)
docs: Add an "privateIP hostname" line to the /etc/hosts file. If destinationIP is given,
          do this on the remote machine.
  
          Azure VMs sometimes fail to initialize, causing the appliance to fail.
          This error is given:
             Failed to obtain the IP address for 'l7d41a19b-15a6-442c-8ba1-9678a951d824';
             the DNS service may not be able to resolve it: Name or service not known.
          This method is a fix.
  
          :param node: Node to add to /etc/hosts.
          :param destinationIP: A remote host's address