This document details the integration between PureBoot and oVirt/RHV (Red Hat Virtualization), providing enterprise-grade virtualization capabilities to the PureBoot provisioning platform.
oVirt is an open-source virtualization management platform that provides:
- Enterprise-grade virtualization comparable to VMware vSphere
- High Availability for virtual machines
- Live Migration between hosts
- Storage Domain Management for centralized storage
- Advanced Networking with software-defined networking
- Web-based Management interface
- REST API for automation and integration
Create VMs:
- Instantiate new virtual machines from templates
- Customize CPU, memory, and storage resources
- Assign to specific clusters and hosts
Template Management:
- Clone from existing templates
- Create new templates from VMs
- Version and manage template libraries
Power Management:
- Start, stop, restart, and suspend VMs
- Graceful shutdown and power operations
- Power state monitoring
Storage Domains:
- Manage multiple storage domains
- Support for NFS, iSCSI, Fibre Channel, and local storage
- Storage migration between domains
Disk Operations:
- Create and attach virtual disks
- Resize disks dynamically
- Snapshot and clone disks
- Hot-plug disks to running VMs
Virtual Networks:
- Create and manage virtual networks
- VLAN configuration
- Network QoS policies
NIC Management:
- Add/remove virtual NICs
- Configure network interfaces
- MAC address management
High Availability:
- Configure HA priorities
- Automatic VM restart on failure
- Host failure detection
Live Migration:
- Migrate running VMs between hosts
- Zero-downtime migrations
- Automatic load balancing
Snapshots:
- Create VM snapshots
- Revert to previous states
- Snapshot scheduling
Base URL: https://{ovirt-engine}/ovirt-engine/api
Authentication:
- Username/password authentication
- Token-based authentication
- SSL/TLS encryption
Key Endpoints:
| Endpoint | Description |
|---|---|
/vms |
VM management |
/templates |
Template management |
/clusters |
Cluster management |
/hosts |
Host management |
/storagedomains |
Storage domain management |
/networks |
Network management |
/disks |
Disk management |
import ovirtsdk4 as sdk
# Connect to oVirt engine
connection = sdk.Connection(
url='https://ovirt-engine.example.com/ovirt-engine/api',
username='admin@internal',
password='password',
insecure=True # For self-signed certs in development
)
# Create a new VM from template
vms_service = connection.system_service().vms_service()
vm = vms_service.add(
vm=sdk.Vm(
name='pureboot-node-01',
cluster=sdk.Cluster(name='Default'),
template=sdk.Template(name='ubuntu-2404-template'),
memory=4294967296, # 4GB
cpu=sdk.Cpu(topology=sdk.CpuTopology(cores=2, sockets=1))
)
)
# Configure VM
vm_service = vms_service.vm_service(vm.id)
# Add additional disk
disks_service = connection.system_service().disks_service()
disk = disks_service.add(
disk=sdk.Disk(
name='pureboot-node-01-data',
format=sdk.DiskFormat.COW,
provisioned_size=53687091200, # 50GB
storage_domains=[sdk.StorageDomain(name='data')]
)
)
disk_attachments_service = vm_service.disk_attachments_service()
disk_attachments_service.add(
attachment=sdk.DiskAttachment(
disk=sdk.Disk(id=disk.id),
interface=sdk.DiskInterface.VIRTIO,
bootable=False,
active=True
)
)
# Start the VM
vm_service.start()
# Monitor VM status
while True:
vm = vm_service.get()
print(f"VM Status: {vm.status}")
if vm.status == sdk.VmStatus.UP:
break
time.sleep(5)
# Clean up
connection.close()┌───────────────────────────────────────────────────────────────┐
│ PureBoot Controller │
└───────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────┐
│ oVirt/RHV Engine │
├─────────────────┬─────────────────┬─────────────────┬───────────┤
│ VM Provisioning │ Template Mgmt │ Storage Mgmt │ Network │
│ │ │ │ Mgmt │
└─────────────────┴─────────────────┴─────────────────┴───────────┘
│
▼
┌───────────────────────────────────────────────────────────────┐
│ Hypervisor Hosts │
└───────────────────────────────────────────────────────────────┘
-
Provisioning Workflow:
- PureBoot triggers VM creation in oVirt
- oVirt provisions VM from template
- PureBoot configures VM for PXE boot
-
Template Synchronization:
- PureBoot manages template library
- Synchronizes templates between PureBoot and oVirt
- Version control for templates
-
Lifecycle Management:
- PureBoot tracks VM state in its database
- oVirt provides real-time VM status
- Combined state management
-
Monitoring and Alerts:
- PureBoot monitors provisioning progress
- oVirt provides VM health monitoring
- Integrated alerting system
Scenario: Rapid deployment of development environments
Workflow:
- Developer requests new VM via PureBoot UI
- PureBoot selects appropriate oVirt template
- oVirt creates VM with specified resources
- PureBoot configures network and PXE boot
- VM boots and installs OS via PureBoot
- Post-install configuration applied
- VM ready for developer use
Benefits:
- Self-service VM provisioning
- Consistent environments
- Rapid deployment (<5 minutes)
- Resource optimization
Scenario: Scaling Kubernetes clusters
Workflow:
- Kubernetes cluster autoscaler requests new node
- PureBoot receives provisioning request
- oVirt creates VM from Kubernetes template
- PureBoot configures PXE boot with kubeadm
- VM boots and joins Kubernetes cluster
- Node ready for workload scheduling
Benefits:
- Automatic cluster scaling
- Consistent node configuration
- Integration with Kubernetes APIs
- Rapid scale-out capability
Scenario: Failover to backup data center
Workflow:
- Primary site failure detected
- PureBoot triggers DR workflow
- oVirt creates VMs in backup site
- PureBoot restores from backups
- Applications brought online
- Traffic redirected to backup site
Benefits:
- Automated failover
- Minimized downtime
- Consistent recovery process
- Testing and validation
-
oVirt/RHV Environment:
- oVirt Engine 4.4 or later
- At least one hypervisor host
- Configured storage domains
- Network configuration
-
PureBoot Configuration:
- Python 3.8+
- ovirtsdk4 package
- Network connectivity to oVirt Engine
- API credentials with appropriate permissions
-
Network Requirements:
- API access to oVirt Engine (port 443)
- PXE network connectivity to hypervisor hosts
- Storage network for disk operations
# Install oVirt SDK
pip install ovirtsdk4
# Install PureBoot oVirt integration module
pip install pureboot-ovirt
# Configure PureBoot
cp config/ovirt.example.yaml config/ovirt.yaml
vim config/ovirt.yaml# config/ovirt.yaml
ovirt:
engine_url: "https://ovirt-engine.example.com/ovirt-engine/api"
username: "admin@internal"
password: "securepassword"
insecure: false # Set to true for self-signed certs in dev
default_cluster: "Default"
default_storage_domain: "data"
templates:
ubuntu-2404: "ubuntu-2404-template"
centos-9: "centos-9-template"
windows-2022: "windows-2022-template"
networks:
management: "ovirtmgmt"
pxe: "pureboot-pxe"
storage: "storage-network"# Test oVirt connection
pureboot-ovirt test-connection
# List available templates
pureboot-ovirt list-templates
# List running VMs
pureboot-ovirt list-vms
# Create test VM
pureboot-ovirt create-vm --name test-vm --template ubuntu-2404 --memory 4096 --cores 2Connection Failed:
- Verify oVirt Engine URL and credentials
- Check network connectivity (port 443)
- Verify SSL certificate validity
Permission Denied:
- Ensure API user has appropriate permissions
- Check user role assignments in oVirt
- Verify user is in correct domain
Template Not Found:
- Verify template exists in oVirt
- Check template name spelling
- Ensure template is in correct cluster
VM Creation Failed:
- Check storage domain availability
- Verify sufficient resources
- Review oVirt engine logs
# Enable debug logging
export PUREBOOT_OVIRT_DEBUG=1
# View API requests
pureboot-ovirt --debug create-vm --name test-vm --template ubuntu-2404
# Check oVirt Engine logs
ssh root@ovirt-engine.example.com "journalctl -u ovirt-engine -f"-
Template Management:
- Use thin-provisioned disks for templates
- Regularly update and optimize templates
- Implement template versioning
-
Resource Allocation:
- Right-size VM resources
- Use resource pools for similar workloads
- Implement QoS policies
-
Storage Configuration:
- Use fast storage for templates
- Implement storage tiers
- Configure appropriate disk formats
-
Authentication:
- Use certificate-based authentication
- Implement strong password policies
- Regularly rotate credentials
-
Network Security:
- Isolate management network
- Use firewalls to restrict API access
- Implement network segmentation
-
Access Control:
- Follow principle of least privilege
- Regularly audit permissions
- Implement role-based access control
-
oVirt Configuration:
- Configure HA for critical VMs
- Implement host failure policies
- Configure VM priority settings
-
PureBoot Configuration:
- Implement controller redundancy
- Configure database replication
- Set up monitoring and alerts
-
Disaster Recovery:
- Regular backup testing
- Document recovery procedures
- Implement geographic redundancy
- Basic VM provisioning via oVirt API
- Template synchronization between PureBoot and oVirt
- VM lifecycle management (start/stop/restart)
- Basic monitoring and status reporting
- Advanced storage management (disks, snapshots)
- Network configuration integration
- High availability configuration
- Live migration support
- Performance monitoring and optimization
- Automated scaling based on workload
- Cost optimization and resource management
- Multi-site oVirt integration
- Advanced security features (encryption, compliance)
- AI-driven resource optimization
The integration between PureBoot and oVirt/RHV provides a powerful combination of provisioning automation and enterprise-grade virtualization. This integration enables:
- Rapid VM Deployment: Combine PureBoot's automation with oVirt's virtualization
- Consistent Environments: Template-based provisioning ensures uniformity
- Enterprise Features: Leverage oVirt's HA, live migration, and storage management
- Scalability: Support for large-scale virtualization environments
- Flexibility: Integration with existing oVirt/RHV infrastructure
This integration positions PureBoot as a comprehensive solution for organizations using oVirt/RHV, providing automated provisioning capabilities while maintaining the enterprise features and reliability of the oVirt platform.
Document Status: Active Last Updated: 2024 Version: 1.0
This document provides detailed guidance for integrating PureBoot with oVirt/RHV virtualization platforms.