What the vm and owner Fields in nts-sources.yml Signify

The vm and owner fields in nts-sources.yml identify whether an NTP server runs on virtualized hardware and which organization operates it, enabling users to filter servers by infrastructure type and attribution.

The jauderho/nts-servers repository maintains nts-sources.yml as the canonical registry of public Network Time Security (NTS) servers. Understanding the vm and owner fields in nts-sources.yml helps system administrators select appropriate time sources based on operational requirements and trust boundaries.

Understanding the owner Field in nts-sources.yml

The owner field specifies the organization, individual, or project responsible for operating and maintaining a specific NTP server. This attribution helps users identify the entity accountable for the service and provides a clear point of contact for trust verification.

Attribution Examples in the Source File

In nts-sources.yml, the owner field appears as a simple string mapping to known infrastructure providers. For example, Cloudflare operates servers listed with owner: Cloudflare, while System76 entries use owner: System76. These values are purely informational and do not modify NTP protocol behavior, but they enable filtering by trusted organizations.

Understanding the vm Field in nts-sources.yml

The vm field is a boolean flag indicating the virtualization status of the server hardware. When set to true, the server runs inside a virtual machine; when false, it operates on bare-metal hardware directly.

Virtualization Status Examples

According to the jauderho/nts-servers source code, specific entries demonstrate both states. A virtualized server entry contains vm: true, while bare-metal deployments use vm: false. This distinction allows users who prefer physical hardware time sources—or wish to avoid virtualized environments—to filter accordingly.

Practical Usage in Automation Scripts

These metadata fields power the project's helper utilities, particularly scripts/ntpServerConvertor.py, which reads nts-sources.yml and generates client-side NTP configurations. The script can optionally filter or annotate servers based on owner attribution or vm status, producing curated server lists for specific deployment scenarios.

Filtering Bare-Metal Servers with Python

To select only bare-metal servers (where vm is false), parse the YAML and filter the list:

import yaml, pathlib

data = yaml.safe_load(pathlib.Path('nts-sources.yml').read_text())
bare_metal = [
    srv for srv in data['servers'] if not srv.get('vm', False)
]

for srv in bare_metal:
    print(f"{srv['hostname']} ({srv['owner']})")

This script loads nts-sources.yml, iterates through the servers list, and excludes any entry where the vm field evaluates to true.

Grouping Servers by Owner Using yq

For shell-based automation, the yq processor can aggregate servers by their owner field:


# Install yq: pip install yq   (or use a native yq binary)

yq '.servers | group_by(.owner)[] | 
   {owner: .[0].owner, count: length, hosts: [.[] .hostname]}' \
   nts-sources.yml

This command produces a JSON report showing each owner, their server count, and associated hostnames.

Selecting Virtual-Machine Servers in Go

When building NTP client tools in Go, define a struct matching the YAML schema and filter by the VM boolean:

type Server struct {
    Hostname string `yaml:"hostname"`
    Owner    string `yaml:"owner"`
    VM       bool   `yaml:"vm"`
}

func filterVM(servers []Server) []Server {
    var vm []Server
    for _, s := range servers {
        if s.VM {
            vm = append(vm, s)
        }
    }
    return vm
}

This function returns a slice containing only virtualized NTP sources from the registry.

Summary

  • The owner field in nts-sources.yml identifies the organization or individual responsible for maintaining each NTP server, enabling trust-based selection.
  • The vm field provides a boolean indicator of virtualization status (true for VMs, false for bare-metal), allowing infrastructure-specific filtering.
  • Both fields are informational metadata that do not alter NTP protocol operations but are consumed by utilities like scripts/ntpServerConvertor.py to generate customized client configurations.
  • Practical implementations in Python, shell, and Go demonstrate how to parse these fields for automated server selection and reporting.

Frequently Asked Questions

Does the vm field affect NTP accuracy or security?

No. The vm field is purely informational metadata within nts-sources.yml. It does not influence the NTP protocol's cryptographic operations or time synchronization precision; it merely documents whether the server runs on virtualized or physical hardware for user preference filtering.

Can I filter nts-sources.yml by multiple owners simultaneously?

Yes. When processing nts-sources.yml programmatically, you can implement set-based filtering to include or exclude specific owner values. The scripts/ntpServerConvertor.py utility demonstrates this pattern by accepting criteria to generate targeted configuration files containing only servers from approved organizations.

Why does nts-sources.yml track virtualization status?

The vm field helps users comply with specific operational policies that require bare-metal time sources for compliance or performance reasons. Some enterprises avoid virtualized NTP servers due to clock drift concerns in certain hypervisor environments, making this metadata essential for infrastructure-aware selection.

Where is the owner field used in the conversion scripts?

In scripts/ntpServerConvertor.py, the owner field is read during YAML parsing to optionally annotate generated NTP configuration files with comments identifying server operators. This allows administrators to quickly identify which organization provides each time source in their client configuration without cross-referencing the original YAML registry.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →