Configuration Fields
type PiKVM struct {
Host string // Host is the address of the PiKVM device (e.g., "192.168.1.100" or "https://pikvm.local")
User string // User for authentication (default: "admin")
Password string // Password for authentication
Timeout string // Timeout for HTTP requests (default: "10s")
client *http.Client
baseURL *url.URL
}
Core Functionality
- Power Management
Similar to IPMI and PDU modules, providing ATX power control:
- on - Power on the DUT via short ATX power button press
- off - Graceful shutdown via short ATX power button press
- force-off - Force power off via long ATX power button press (4-5 seconds)
- reset - Reset via short ATX reset button press
- force-reset - Force reset via long ATX reset button press
- status - Query current power state
API Endpoint: /api/atx/power and /api/atx/click
- Keyboard Control
Send keyboard input to the DUT:
- type - Type a text string
- key - Send a single key (e.g., "Enter", "Escape", "F12")
- combo - Send key combination (e.g., "Ctrl+Alt+Delete")
- paste - Paste text from stdin or file
API Endpoint: /api/hid/events/send_key
- Virtual Media
Mount ISO images or disk images as virtual USB devices:
- mount - Mount an image file from the agent's filesystem
- mount-url - Mount an image from a URL
- unmount - Unmount current virtual media
- media-status - Show mounted media information
API Endpoint: /api/msd (Mass Storage Device)
Command Interface
Power management
pikvm on # Power on
pikvm off # Graceful shutdown
pikvm force-off # Force power off
pikvm reset # Reset
pikvm status # Get power status
Keyboard control
pikvm type "Hello World" # Type text
pikvm key Enter # Press Enter key
pikvm key F12 # Press F12 (boot menu)
pikvm combo Ctrl+Alt+Delete # Send Ctrl+Alt+Delete
Virtual media
pikvm mount /path/to/image.iso # Mount ISO
pikvm mount-url https://example.com/os.iso # Mount from URL
pikvm unmount # Unmount media
pikvm media-status # Check mounted media
Configuration Fields
Core Functionality
Similar to IPMI and PDU modules, providing ATX power control:
API Endpoint: /api/atx/power and /api/atx/click
Send keyboard input to the DUT:
API Endpoint: /api/hid/events/send_key
Mount ISO images or disk images as virtual USB devices:
API Endpoint: /api/msd (Mass Storage Device)
Command Interface
Power management
pikvm on # Power on
pikvm off # Graceful shutdown
pikvm force-off # Force power off
pikvm reset # Reset
pikvm status # Get power status
Keyboard control
pikvm type "Hello World" # Type text
pikvm key Enter # Press Enter key
pikvm key F12 # Press F12 (boot menu)
pikvm combo Ctrl+Alt+Delete # Send Ctrl+Alt+Delete
Virtual media
pikvm mount /path/to/image.iso # Mount ISO
pikvm mount-url https://example.com/os.iso # Mount from URL
pikvm unmount # Unmount media
pikvm media-status # Check mounted media