Insecure Development Mode
Local Dev OnlyNo TLSRapid Prototyping
Insecure mode allows running the PiVirt Agent and pvcli without TLS certificates, streamlining local feature development and testing.
1. Agent Configuration
Section titled “1. Agent Configuration”To start the agent in insecure mode, copy the provided agent.conf.dev template or configure insecure = true:
# Copy dev config templatecp agent.conf.dev agent.conf
# Run the agent binary./bin/agent -config agent.conf# Set insecure modeinsecure = true
# Network listenerslisten_address = "localhost:5001"director_address = "localhost:5000"
# Hypervisor connectionhypervisor_type = "pivirtd"pivirtd_socket = "/var/lib/pivirt/daemon/pivirtd.sock"
# Storage pathsimage_dir = "/var/lib/pivirt/images"instance_dir = "/var/lib/pivirt/vms"When insecure = true:
- TLS certificates and
cert_pathare not required. - Client authentication is bypassed.
- gRPC / ConnectRPC transport runs over plain HTTP/2 or HTTP/1.1.
2. CLI Setup (pvcli)
Section titled “2. CLI Setup (pvcli)”Configure pvcli to communicate with the insecure development agent:
-
Add a Development Context:
Terminal window pvcli context add dev localhost 5001 -
Enable Insecure Mode for Context:
Terminal window pvcli context set dev --insecure=true -
Switch to Dev Context:
Terminal window pvcli context switch dev -
Verify Connectivity:
Terminal window pvcli vm list
3. Switching Back to Secure Mode
Section titled “3. Switching Back to Secure Mode”Before deploying or pushing changes:
- In
agent.conf, setinsecure = false. - Ensure valid TLS / PiTrust PKI certificates reside in the configured
cert_path. - In
pvcli, switch back to a secured context or toggle--insecure=false:Terminal window pvcli context set dev --insecure=false