def __add_node_dns(self, node_id):
        nspath = self.nsroot + "/" + self.uniquePrefix(node_id)
        resolv_path = nspath + "/" + "resolv.conf"

        if not os.path.isdir(nspath):
            cmd = "mkdir -p " + nspath
            cmd = self.runAsRoot(cmd)
            ret = self.CallAtHost(cmd)

        if not os.path.exists(resolv_path):
            cmd = "touch " + resolv_path
            cmd = self.runAsRoot(cmd)
            ret = self.CallAtHost(cmd)

        cmd = "chmod 666 " + resolv_path
        cmd = self.runAsRoot(cmd)
        ret = self.CallAtHost(cmd)

        with open(resolv_path, 'w') as res:
            for dns_addr in self.dns:
                line = "nameserver " + dns_addr + "\n"
                res.write(line)