larsks / blog.oddbit.com

3 stars 0 forks source link

post/2013-10-04-automatic-dns-entrie/ #18

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Automatic hostname entries for libvirt domains · The Odd Bit

Have you ever wished that you could use libvirt domain names as hostnames? So that you could do something like this: $ virt-install -n anewhost ... $ ssh clouduser@anewhost Since this is something that would certainly make my life convenient, I put together a small script called virt-hosts that makes this possible. You can find virt-hosts in my virt-utils GitHub repository: https://raw.github.com/larsks/virt-utils/master/virt-hosts Run by itself, with no options, virt-hosts will scan through your running domains for interfaces on the libvirt default network, look up those MAC addresses up in the corresponding default.

https://blog.oddbit.com/post/2013-10-04-automatic-dns-entrie/

petergs commented 2 years ago

This is awesome, and something I'm looking forward to using in my homelab. Thanks! Part of my lab is running in containers, and I'm doing service discovery with CoreDNS for local resolution. I'm trying to figure out a solution for libvirt and this might fit the bill for a bit.