Skip to content

Corsinvest/cv4pve-pepper

Repository files navigation

cv4pve-pepper 🌢️

cv4pve-pepper Banner

πŸ–₯️ Simplified SPICE Remote Viewer Launcher for Proxmox VE

License Release Downloads .NET

⭐ We appreciate your star, it helps! ⭐


πŸš€ Quick Start

# Download and extract (replace VERSION with actual version)
wget https://github.com/Corsinvest/cv4pve-pepper/releases/download/VERSION/cv4pve-pepper-linux-x64.zip
unzip cv4pve-pepper-linux-x64.zip

# Launch SPICE viewer for VM 100
./cv4pve-pepper --host=YOUR_HOST --username=root@pam --password=YOUR_PASSWORD \
                --vmid=100 --viewer=/usr/bin/remote-viewer

# With API token (recommended)
./cv4pve-pepper --host=YOUR_HOST --api-token=user@realm!token=uuid \
                --vmid=100 --viewer=/usr/bin/remote-viewer

πŸ“‹ Table of Contents

πŸ—‚οΈ Click to expand navigation

🌟 Features

     ______                _                      __
    / ____/___  __________(_)___ _   _____  _____/ /_
   / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
  / /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
  \____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

  🌢️ Launching SPICE remote-viewer for Proxmox VE (Made in Italy)

πŸ† Core Capabilities

⚑ Simplified SPICE Access

  • βœ… No GUI required - Pure command-line operation
  • βœ… No .vv file downloads - Direct SPICE connection
  • βœ… Automatic ticket management - Handles Proxmox VE tickets
  • βœ… Cross-platform - Windows, Linux, macOS support
  • βœ… Native C# implementation for reliability

πŸ”§ Advanced Features

  • βœ… Auto start/resume VMs on connection
  • βœ… High availability support with multiple hosts
  • βœ… Custom viewer options pass-through
  • βœ… File-based configuration for automation
  • βœ… SSL validation options

πŸ›‘οΈ Enterprise Ready

  • βœ… API token authentication (Proxmox VE 6.2+)
  • βœ… No root access required on Proxmox hosts
  • βœ… External execution - runs outside Proxmox VE
  • βœ… Multiple host support for cluster setups
  • βœ… Secure authentication methods

πŸš€ User Experience

  • βœ… Simple installation - single binary extraction
  • βœ… Minimal configuration required
  • βœ… Debug mode for troubleshooting
  • βœ… Flexible proxy support for reverse proxies
  • βœ… Wait for startup - configurable VM boot time

πŸ“¦ Installation

Installation Guide

🐧 Linux Installation

# Check available releases at: https://github.com/Corsinvest/cv4pve-pepper/releases
# Download specific version (replace VERSION with actual version)
wget https://github.com/Corsinvest/cv4pve-pepper/releases/download/VERSION/cv4pve-pepper-linux-x64.zip

# Extract
unzip cv4pve-pepper-linux-x64.zip

# Make executable
chmod +x cv4pve-pepper

# Optional: Move to system path
sudo mv cv4pve-pepper /usr/local/bin/

# Verify installation
cv4pve-pepper --version

πŸͺŸ Windows Installation

# Download from GitHub releases (replace VERSION with actual version)
Invoke-WebRequest -Uri "https://github.com/Corsinvest/cv4pve-pepper/releases/download/VERSION/cv4pve-pepper-win-x64.zip" -OutFile "cv4pve-pepper.zip"

# Extract
Expand-Archive cv4pve-pepper.zip -DestinationPath "C:\Tools\cv4pve-pepper"

# Add to PATH (optional)
$env:PATH += ";C:\Tools\cv4pve-pepper"

# Verify installation
cv4pve-pepper.exe --version

🍎 macOS Installation

# Download and extract (replace VERSION with actual version)
wget https://github.com/Corsinvest/cv4pve-pepper/releases/download/VERSION/cv4pve-pepper-osx-x64.zip
unzip cv4pve-pepper-osx-x64.zip
chmod +x cv4pve-pepper

# Move to applications
sudo mv cv4pve-pepper /usr/local/bin/

# Verify installation
cv4pve-pepper --version

πŸ–₯️ SPICE Client Setup

SPICE Client

πŸ“‹ Requirements

cv4pve-pepper requires a SPICE client (virt-viewer) to be installed on your system.

🐧 Linux SPICE Client

# Ubuntu/Debian
sudo apt update && sudo apt install virt-viewer

# CentOS/RHEL/Fedora
sudo dnf install virt-viewer

# Verify installation
which remote-viewer
# Should output: /usr/bin/remote-viewer

πŸͺŸ Windows SPICE Client

  1. Download virt-viewer 0.5.6 or higher from SPICE official site
  2. Install the package as Administrator
  3. Note the path - typically: C:\Program Files\VirtViewer v?.?-???\bin\remote-viewer.exe

🍎 macOS SPICE Client

# Using Homebrew
brew install virt-viewer

# Or download from official site
# Note: macOS client may have limitations

πŸ“ Common SPICE Client Paths

OS Typical Path
Linux /usr/bin/remote-viewer
Windows C:\Program Files\VirtViewer v?.?-???\bin\remote-viewer.exe
macOS /usr/local/bin/remote-viewer

βš™οΈ Configuration

Configuration Setup

πŸ” Authentication Methods

πŸ”‘ Username/Password

cv4pve-pepper \
  --host=pve.local \
  --username=user@pam \
  --password=your_password \
  --vmid=100 \
  --viewer=/usr/bin/remote-viewer

🎫 API Token (Recommended)

cv4pve-pepper \
  --host=pve.local \
  --api-token=user@realm!token=uuid \
  --vmid=100 \
  --viewer=/usr/bin/remote-viewer

πŸ“ Password from File

# Use interactive password prompt
cv4pve-pepper \
  --host=pve.local \
  --username=user@pam \
  --password=file:/etc/cv4pve/password \
  --vmid=100 \
  --viewer=/usr/bin/remote-viewer

# First run: prompts and saves password
# Later runs: reads from file

πŸ“„ Configuration Files

πŸ“‹ Using Parameter Files

Create a configuration file for repeated use:

Create Configuration File

# /etc/cv4pve/pepper.conf
--host=pve.cluster.local
--api-token=spice@pve!viewer=uuid-here
--viewer=/usr/bin/remote-viewer
--viewer-options=-f --full-screen
--start-or-resume
--wait-for-startup=10

Use Configuration File

cv4pve-pepper @/etc/cv4pve/pepper.conf --vmid=100

πŸ”§ Usage Examples

Usage Examples

πŸ–₯️ Basic SPICE Connection

πŸ”„ Simple VM Connection

Connect to VM by ID

cv4pve-pepper --host=pve.local --username=root@pam --password=secret \
              --vmid=100 --viewer=/usr/bin/remote-viewer

Connect to VM by Name

cv4pve-pepper --host=pve.local --api-token=user@pam!token=uuid \
              --vmid=web-server --viewer=/usr/bin/remote-viewer

Auto-start Stopped VM

cv4pve-pepper --host=pve.local --api-token=user@pam!token=uuid \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --start-or-resume --wait-for-startup=15

πŸŽ›οΈ Advanced Options

βš™οΈ Viewer Customization

Full Screen Mode

cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --viewer-options="-f"

Multiple Viewer Options

cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --viewer-options="--full-screen --zoom=200"

Custom Proxy Configuration

cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --proxy=https://spice-proxy.company.com:3128

🏒 High Availability Setup

πŸ”„ Cluster Configuration

Multiple Proxmox Hosts

cv4pve-pepper --host=pve1.local:8006,pve2.local:8006,pve3.local:8006 \
              --api-token=cluster@pve!spice=uuid \
              --vmid=100 --viewer=/usr/bin/remote-viewer

SSL Certificate Validation

cv4pve-pepper --host=pve.company.com --validate-certificate \
              --api-token=secure@pve!token=uuid \
              --vmid=100 --viewer=/usr/bin/remote-viewer

πŸ”§ Debug & Troubleshooting

πŸ› Debug Mode

Enable Debug Output

cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --debug

Test Connection Only

# Use --help to verify all parameters
cv4pve-pepper --host=pve.local --api-token=token --help

πŸ” Security & Authentication

Security & Authentication

πŸ›‘οΈ Required Permissions

For SPICE access, the user/token needs minimal permissions:

Permission Purpose Scope
VM.Console Access VM console Virtual machines
VM.Audit Read VM information Virtual machines

🎫 API Token Setup

πŸ”§ Creating SPICE Access Token

1. Create API Token

Follow Proxmox VE documentation for creating API tokens with the required permissions listed above.

2. Use Token in Commands

cv4pve-pepper --host=pve.local --api-token=spice@pve!viewer=uuid-from-creation \
              --vmid=100 --viewer=/usr/bin/remote-viewer

πŸ”’ Security Best Practices

βœ… Recommended

  • βœ… Use API tokens instead of passwords
  • βœ… Enable SSL certificate validation in production
  • βœ… Use dedicated accounts for SPICE access
  • βœ… Store credentials in secure configuration files
  • βœ… Limit token permissions to minimum required

❌ Avoid

  • ❌ Using root credentials for SPICE access
  • ❌ Storing passwords in plain text scripts
  • ❌ Disabling SSL validation without good reason
  • ❌ Sharing tokens between different applications
  • ❌ Using overly broad permissions

πŸ› οΈ Troubleshooting

Troubleshooting

⚠️ Common Issues & Solutions

πŸ”Œ "No SPICE Port" Error

Problem

Error: no spice port

Solution

This error appears when the VM's display hardware is not configured for SPICE:

  1. Go to Proxmox web interface
  2. Select your VM β†’ Hardware
  3. Edit Display device
  4. Set Type to "SPICE (qxl)"
  5. Start/restart the VM
πŸ” Authentication Issues

Problem: "Authentication failed"

# Check credentials and permissions
cv4pve-pepper --host=pve.local --username=test@pam --password=wrong \
              --vmid=100 --viewer=/usr/bin/remote-viewer --debug

Solution

  1. Verify credentials in Proxmox web interface
  2. Check user permissions (VM.Console, VM.Audit)
  3. Test API token format: user@realm!tokenid=uuid
πŸ–₯️ SPICE Client Issues

Problem: "Viewer not found"

# Test if remote-viewer is available
which remote-viewer
# or
/usr/bin/remote-viewer --version

Solution

  1. Install virt-viewer package
  2. Verify correct path to remote-viewer
  3. Use full path in --viewer parameter
🌐 Network Issues

Problem: Connection timeouts

# Test with debug mode
cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer --debug

Solution

  1. Check network connectivity to Proxmox host
  2. Verify firewall rules (port 8006 for API, SPICE ports)
  3. Test with IP address instead of hostname

πŸ” Debug Mode

πŸ› Enabling Debug Output
# Enable detailed logging
cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --debug

# Debug output will show:
# - API connection details
# - Authentication process
# - SPICE ticket generation
# - Viewer launch commands

πŸ“Š Command Reference

Command Reference

πŸ”§ Global Options

βš™οΈ Complete Parameter List
cv4pve-pepper [options]

Connection Options

Parameter Description Example
--host Proxmox host(s) --host=pve.local:8006
--username Username@realm --username=spice@pve
--password Password or file --password=secret
--api-token API token --api-token=user@realm!token=uuid
--validate-certificate Validate SSL certificate --validate-certificate

VM & Viewer Options

Parameter Description Required
--vmid VM ID or name ❌ Optional
--viewer Path to remote-viewer βœ… Required
--viewer-options Options for SPICE viewer ❌ Optional

Advanced Options

Parameter Description Default
--proxy SPICE proxy server None
--start-or-resume Auto-start stopped/paused VM false
--wait-for-startup Wait seconds for VM startup 5
--debug Enable debug output false

πŸ“– Usage Examples by Category

🎯 Common Use Cases

Basic Connection

# Simple connection
cv4pve-pepper --host=pve.local --username=root@pam --password=secret \
              --vmid=100 --viewer=/usr/bin/remote-viewer

# With API token
cv4pve-pepper --host=pve.local --api-token=spice@pve!token=uuid \
              --vmid=web-server --viewer=/usr/bin/remote-viewer

Production Setup

# HA cluster with SSL validation
cv4pve-pepper --host=pve1.local,pve2.local,pve3.local --validate-certificate \
              --api-token=production@pve!spice=uuid \
              --vmid=100 --viewer=/usr/bin/remote-viewer

# Auto-start with custom timeout
cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --start-or-resume --wait-for-startup=30

Customized Viewer

# Full screen with high quality
cv4pve-pepper --host=pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --viewer-options="--full-screen --zoom=150"

# Through reverse proxy
cv4pve-pepper --host=internal-pve.local --api-token=token \
              --vmid=100 --viewer=/usr/bin/remote-viewer \
              --proxy=https://proxy.company.com:3128

πŸ“ž Support & Community

Support & Community

🏒 Commercial Support

πŸ’Ό Enterprise Support

cv4pve-tools

Professional support and services

🌐 Official Website

Corsinvest

Complete information and documentation

🀝 Community Resources

Resource Description
GitHub Issues Bug reports and feature requests
GitHub Discussions Community Q&A and discussions
Proxmox Forum General Proxmox VE community
cv4pve Documentation Complete documentation suite

πŸ”„ Contributing

We welcome contributions! Here's how you can help:

  • πŸ› Report bugs via GitHub Issues
  • πŸ’‘ Suggest features through GitHub Discussions
  • πŸ“– Improve documentation with pull requests
  • πŸ§ͺ Test releases and provide feedback
  • 🌟 Star the repository to show support


πŸ“„ License

Copyright Β© Corsinvest Srl

This software is part of the cv4pve-tools suite. For licensing details, please visit LICENSE.


Part of cv4pve-tools suite | Made with ❀️ in Italy by Corsinvest

Packages

No packages published

Contributors 5