• Notes
  • Articles
  • Followers 31
  • Following 51
  • Remote follow

Nevkontakte
@me@m.nevkontakte.com

Lawful neutral. Definitely not a cat in a hat. Opinions are of Cthulhu. what/why.

Long-form

nevkontakte.com

Chirp

twitter.com/nevkontakte

Code

github.com/nevkontakte

🔑
Nevkontakte's avatar
Nevkontakte
@me@m.nevkontakte.com

Learned about a new neat #libvirt feature today:

In a network configuration you can add the following:

<network>
  <!-- ... -->
  <domain localonly="yes" name="virt" register="yes">
</domain></network>

This will allow addressing vms connected to that network via automatically-registered hostnames, for example for a VM with a ubuntu-test hostname, you should be able to access it from the host or any other VM on the same network as ubuntu-test.virt. Pretty neat if you don't want (or unable to, like my brain) memorize IP addresses.

  • name="virt" defines the shared part of the domain. Could be made up like in my example, could be a domain you own, such as workstation.nevkontakte.com.
  • localOnly="yes" configures libvirt-managed dnsmasq not to route non-existent domain queries to the external resolver. If you are using a made-up domain, you probably want this to be "yes", since external resolvers won't know anything about it anyway.
  • register="yes" automatically sets up your host's resolver so that you can access those domain names from the host. You can make it work without, but it's a nice quality of life feature, especially if you have several virtual networks in play.

Source: https://libvirt.org/formatnetwork.html#connectivity (scroll down to the "domain" section).

libvirt: Network XML format libvirt.org
  • permalink
  • interact from your instance
  • a day ago
Powered by microblog.pub 2.0.0+dev and the ActivityPub protocol. Admin.