agent Daemon Reference
The PiVirt Agent (pivirt-agent) runs as a system daemon on each hypervisor node, orchestrating node-level ConnectRPC services, discovery, and storage/network subsystems.
Service Management
Section titled “Service Management”Use systemd to manage the agent service.
# start the agentsudo systemctl start pivirt-agent
# stop the agentsudo systemctl stop pivirt-agent
# restart the agentsudo systemctl restart pivirt-agent
# check statussudo systemctl status pivirt-agent
# enable on bootsudo systemctl enable pivirt-agentHealth Endpoints
Section titled “Health Endpoints”gRPC Health Check
Section titled “gRPC Health Check”# check agent healthgrpcurl -plaintext localhost:8443 grpc.health.v1.Health/Check
# check specific servicegrpcurl -plaintext -d '{"service": "pivirt.vm.v1.VMService"}' \ localhost:8443 grpc.health.v1.Health/CheckHTTP Health Check
Section titled “HTTP Health Check”# check agent healthcurl http://localhost:8444/health
# check readinesscurl http://localhost:8444/ready
# check livenesscurl http://localhost:8444/liveManagement Endpoints
Section titled “Management Endpoints”Reload Configuration
Section titled “Reload Configuration”curl -X POST http://localhost:8444/reloadDebug Endpoints
Section titled “Debug Endpoints”# get debug infocurl http://localhost:8444/debug/vars
# get goroutine stack tracescurl http://localhost:8444/debug/pprof/goroutine?debug=1
# get heap profilecurl http://localhost:8444/debug/pprof/heap > heap.profMetrics
Section titled “Metrics”Prometheus Metrics
Section titled “Prometheus Metrics”# get all metricscurl http://localhost:8444/metrics
# get specific metricscurl http://localhost:8444/metrics | grep pivirt_api_requests_totalService Discovery
Section titled “Service Discovery”List Registered Services
Section titled “List Registered Services”# list all servicesgrpcurl -plaintext localhost:8443 \ pivirt.discovery.v1.DiscoveryService/ListServices
# get specific servicegrpcurl -plaintext -d '{"name": "pivirtd"}' \ localhost:8443 \ pivirt.discovery.v1.DiscoveryService/GetServiceConfiguration Validation
Section titled “Configuration Validation”# validate configurationpivirt-agent --config /etc/pivirt-agent/config.yaml --validate
# show effective configurationpivirt-agent --config /etc/pivirt-agent/config.yaml --show-configTroubleshooting
Section titled “Troubleshooting”Check PiTrust Certificates
Section titled “Check PiTrust Certificates”# verify certificate chainopenssl verify -CAfile /etc/pivirt/certs/ca-chain.pem /etc/pivirt/certs/agent-server.crt
# verify certificate detailsopenssl x509 -in /etc/pivirt/certs/agent-server.crt -text -noout | grep -A1 "Subject Alternative Name"Check Service Mesh
Section titled “Check Service Mesh”# list backend connectionscurl http://localhost:8444/debug/backends
# check backend healthcurl http://localhost:8444/debug/backends/healthDebug Logging
Section titled “Debug Logging”# enable debug loggingpivirt-agent --config /etc/pivirt-agent/config.yaml --log-level debug
# view debug logssudo journalctl -u pivirt-agent -f | grep DEBUG