Last Updated: February 25, 2016
· tralamazza

nodejs reverse proxy for libvirt domains

Problem: I want an easy way to access my vm's http server, but I don't want to setup a reverse proxy manually each time one goes up/down.

Solution: A "libvirt" aware reverse proxy

Use libvirt's hook system to restart the proxy and reload the routing table. By default the routing table is <vm name>.<hostname> -> <vm name>.

ps: Don't forget to update your host's resolv.conf to use itself as a nameserver: