libvirt

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 16 Imported by: 1

README

coredns-libvirt

This plugin allows CoreDNS to resolve names matching libvirt domains. It is similar to the nss plugin libvirt_guest.

Usage

Currently this plugin can only be used in the guest mode.

Guest name

The functionality of libvirt guest is analogous to the libvirt_guest nss plugin, where we look for a match on the name of the libvirt domain, not necessarily a hostname.

Zones

If your zone isn't root ., you'll likely want to include the trim_suffix directive so you search for the correct name in your guests.

Filtering by network

If only some of the IPs assigned to the guests are reachable, you can filter them with the keep directive.

Example

vm:1053 {
  libvirt guest {
    trim_suffix vm
    keep 10.101.0.0/24
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressEntry

type AddressEntry struct {
	MACAddress string `json:"mac-address"`
	IPAddress  string `json:"ip-address"`
}

type Bridge

type Bridge struct {
	Addresses []AddressEntry
	MACs      []MacEntry
}

type MacEntry

type MacEntry struct {
	Domain string   `json:"domain"`
	MACs   []string `json:"macs"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL