VirtRigaud Examples¶
This directory contains examples for VirtRigaud v0.3.8. All YAML examples use the infra.virtrigaud.io/v1beta1 API.
Quick Start Examples¶
Basic Examples¶
- complete-example.yaml - Complete end-to-end example with Provider, VMClass, VMImage, and VirtualMachine
- vm-ubuntu-small.yaml - Simple Ubuntu VM with graceful shutdown
- vmclass-small.yaml - Basic VMClass definition
Provider Examples¶
- provider-vsphere.yaml - vSphere provider configuration
- provider-libvirt.yaml - Libvirt provider configuration
Resource Examples¶
- vmimage-ubuntu.yaml - VM image configuration
- vmnetwork-app.yaml - Network attachment configuration
v0.3.8 Feature Examples¶
VMClone (MVP — vSphere and Proxmox only)¶
The VMClone controller is active in v0.3.8. Full and linked clones are supported when the source is a vmRef on the same provider. Libvirt returns Unimplemented.
Networking Examples¶
- vsphere-static-ip.yaml - Static IPv4 assignment via
guestinfo.network.* - vmnetwork-app.yaml - Network attachment configuration
Advanced Provider Examples¶
- vsphere-advanced-example.yaml - Advanced vSphere with v0.2.1 features
- libvirt-advanced-example.yaml - Advanced LibVirt configuration
-
proxmox-complete-example.yaml - Complete Proxmox setup
-
advanced/vsphere-clone-example.yaml — Full and linked VMClone examples for vSphere
- advanced/proxmox-clone-example.yaml — VMClone for Proxmox VE
Minimal clone example:
apiVersion: infra.virtrigaud.io/v1beta1
kind: VMClone
metadata:
name: my-clone
namespace: default
spec:
source:
vmRef:
name: source-vm
namespace: default
targetName: my-clone-target
classRef:
name: small
namespace: default
options:
type: Full # or Linked
VMSet not functional in v0.3.8
VMSet resources are accepted by the API server but the controller stub immediately sets Ready=False / Reason=ControllerNotImplemented. Do not use VMSet for production workloads.
v0.2.1 Feature Examples¶
The following examples were added for v0.2.1 features and are still valid in v0.3.8:
- v021-feature-showcase.yaml - Graceful shutdown, lifecycle hooks, hardware version
- graceful-shutdown-examples.yaml - OffGraceful power state configurations
- vsphere-hardware-versions.yaml - Hardware version management
- disk-sizing-examples.yaml - Disk size configuration
Advanced Provider Examples¶
- vsphere-advanced-example.yaml - Advanced vSphere configuration
- libvirt-advanced-example.yaml - Advanced Libvirt configuration
- proxmox-complete-example.yaml - Proxmox setup
- libvirt-complete-example.yaml - Complete Libvirt deployment
- multi-provider-example.yaml - Multiple providers in one cluster
Migration Examples¶
Storage and migration direction constraints
storage.type: pvc is the only accepted value. S3, NFS, block, and live storage backends do not exist in the CRD and will be rejected by the controller. Additionally, only the vSphere → Libvirt migration direction is tested; other source/target pairs are documented but not validated in production. See Migration User Guide for details.
- vmmigration-basic.yaml - Basic vSphere → Libvirt migration
- vmmigration-advanced.yaml - Migration with storage and network mapping
Advanced Examples¶
See the advanced/ subdirectory for:
- advanced/vm-reconfigure-and-snapshot.yaml - VM reconfiguration with pre-reconfigure snapshot
- advanced/vsphere-clone-example.yaml - VMClone from an existing VM (vSphere, Full + Linked)
- advanced/proxmox-clone-example.yaml - VMClone for Proxmox VE
- advanced/console-access-example.yaml - Console URL access
- advanced/snapshot-lifecycle.yaml - Snapshot lifecycle management
- advanced/vsphere-task-tracking.yaml - Async task tracking status
Nested Virtualization¶
- nested-virtualization.yaml - VMClass with nested virtualization enabled
Usage Patterns¶
Apply an example¶
kubectl apply -f examples/provider-vsphere.yaml
kubectl apply -f examples/vmimage-ubuntu.yaml
kubectl apply -f examples/vm-ubuntu-small.yaml
Watch VM status¶
Get console URL¶
Trigger VM reconfiguration¶
File Organization¶
src/examples/
├── index.md # This file
├── complete-example.yaml # Complete setup
├── v021-feature-showcase.yaml # v0.2.1 features
├── vm-ubuntu-small.yaml # Simple VM
├── vmclass-small.yaml # Basic VMClass
├── provider-vsphere.yaml # vSphere provider
├── provider-libvirt.yaml # Libvirt provider
├── vmimage-ubuntu.yaml # VM image
├── vmnetwork-app.yaml # Network attachment
├── graceful-shutdown-examples.yaml # Graceful shutdown
├── vsphere-hardware-versions.yaml # Hardware versions
├── disk-sizing-examples.yaml # Disk sizing
├── vmmigration-basic.yaml # Migration (tested)
├── vmmigration-advanced.yaml # Migration with mapping
├── nested-virtualization.yaml # Nested virt VMClass
├── advanced/ # Complex scenarios
├── secrets/ # Secret management
└── security/ # Security configurations
Version Compatibility¶
- v0.3.8: All examples in this directory; VMClone examples require v0.3.8+
- v0.3.x: Examples are backward compatible within the v0.3.x line (VMClone examples require v0.3.8)
- v0.2.x and older: Not supported