π Advanced Features Guide
This document covers the advanced features added to zorvia in the innovation phase.
π Status Command - Detailed VM Informationβ
Get comprehensive status information about a VM including resources, volumes, networks, and conditions.
Usageβ
# Show detailed VM status
zorvia status my-vm
# Watch mode - continuously update status
zorvia status my-vm --watch
# Custom update interval (in seconds)
zorvia status my-vm --watch --interval 5
Example Outputβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VM Status: web-server-1 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Basic Information:
Name: web-server-1
Namespace: production
Running: Yes β
Ready: Yes β
Phase: Running
Created: 2024-02-05T10:30:45Z
Resources:
CPU Cores: 4
Memory: 8Gi
Volumes (2):
β’ rootdisk
β’ datadisk
Networks (1):
β’ default
Conditions:
β Ready - True
Reason: VMReady
Message: VM is ready and running
π Clone Command - Duplicate VMsβ
Clone an existing VM to create a new one with the same configuration.
Usageβ
# Basic clone
zorvia clone source-vm target-vm
# Clone and start immediately
zorvia clone source-vm target-vm --start
Exampleβ
# Clone production database for testing
zorvia clone prod-db test-db
# Clone and start for development
zorvia clone web-server-1 web-server-2 --start
What Gets Clonedβ
β CPU configuration β Memory settings β Disk configurations β Network interfaces β Labels (except kubevirt.io/vm) β Cloud-init data
β οΈ Note: Actual disk data is NOT cloned - you get empty disks of the same size.
π Resources Command - Usage Summaryβ
View resource allocation across all VMs with sorting and filtering.
Usageβ
# Show resources in current namespace
zorvia resources
# Show resources across all namespaces
zorvia resources --all-namespaces
# Sort by CPU usage
zorvia resources --sort-by cpu
# Sort by memory
zorvia resources --sort-by memory
Example Outputβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Resource Summary β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
VMs:
Total: 5
Running: 3 β
Stopped: 2 β
Resources (Requested):
Total CPU: 24 cores
Total Memory: 48.00 Gi
Per VM Average:
CPU: 4.8 cores
Memory: 9.60 Gi
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VM Resource Details β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NAME NAMESPACE CPU MEMORY
----------------------------------------------------------------------
web-server-1 production 4 8Gi
web-server-2 production 4 8Gi
database-1 production 8 16Gi
test-vm development 4 8Gi
dev-vm development 4 8Gi
π€ Export Command - Save VM Configurationsβ
Export existing VM configurations for backup or migration.
Usageβ
# Export to stdout
zorvia export my-vm
# Export to file
zorvia export my-vm --output backup.yaml
# Export as KubeVirt manifest
zorvia export my-vm --kubevirt --output vm.kubevirt.yaml
Use Casesβ
- Backup: Save VM configurations before making changes
- Migration: Export from one cluster and import to another
- Version Control: Track VM configurations in git
- Templates: Create custom templates from existing VMs
π§ Wizard Command - Interactive VM Creationβ
Interactive, guided VM creation with prompts and defaults.
Usageβ
# Start wizard without pre-filling name
zorvia wizard
# Start wizard with name pre-filled
zorvia wizard my-new-vm
Interactive Flowβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Interactive VM Creation Wizard β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
VM Name: web-server-prod
Select a template:
> ubuntu
centos
fedora
debian
rhel
windows
CPU Cores [2]: 4
Memory (e.g., 4Gi, 8Gi) [4Gi]: 8Gi
Disk Size (e.g., 20Gi, 40Gi) [20Gi]: 100Gi
Start VM immediately?
> No
Yes
Creating VM with the following configuration:
Name: web-server-prod
Template: ubuntu
CPU: 4 cores
Memory: 8Gi
Disk: 100Gi
β VM 'web-server-prod' created successfully
Benefitsβ
- No need to remember flags or options
- Visual template selection
- Sensible defaults
- Validation before creation
- Great for beginners
π― Batch Command - Create Multiple VMsβ
Create multiple VMs at once from a batch configuration file.
Usageβ
# Dry run to preview
zorvia batch cluster.yaml --dry-run
# Create all VMs
zorvia batch cluster.yaml
# Override namespace for all VMs
zorvia batch cluster.yaml --namespace production
# Continue on errors instead of stopping
zorvia batch cluster.yaml --continue-on-error
Batch Configuration Formatβ
namespace: production
vms:
- name: web-server-1
namespace: production
cpu:
cores: 4
sockets: 1
threads: 1
memory:
size: 8Gi
disks:
- name: rootdisk
size: 40Gi
boot_order: 1
source:
type: containerDisk
image: quay.io/containerdisks/ubuntu:22.04
interfaces:
- name: default
network: default
model: virtio
network_type: pod
cloud_init:
user_data: |
#cloud-config
hostname: web-server-1
packages:
- nginx
labels:
app: web
tier: frontend
- name: web-server-2
# ... similar configuration
- name: web-server-3
# ... similar configuration
Example Outputβ
Loading batch configuration from: cluster.yaml
Found 3 VMs to create
[00:00:15] ========================================> 3/3 Batch creation complete
β web-server-1 created successfully
β web-server-2 created successfully
β web-server-3 created successfully
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Batch Summary β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Total VMs: 3
Successful: 3 β
Failed: 0 β
Use Casesβ
- Cluster Deployment: Deploy entire application stacks
- Testing: Create multiple test environments
- Development: Spin up dev clusters
- Demos: Quickly create demonstration environments
Best Practicesβ
- Use
--dry-runfirst to verify configuration - Enable
--continue-on-errorfor large batches - Organize batch files by environment or purpose
- Use meaningful VM names and labels
- Version control your batch configurations
π¨ Features Comparisonβ
| Feature | Basic CLI | Advanced Features |
|---|---|---|
| Create VM | β | β |
| List VMs | β | β |
| Delete VM | β | β |
| Start/Stop | β | β |
| Generate Manifest | β | β |
| Detailed Status | β | β |
| Clone VM | β | β |
| Resource Summary | β | β |
| Export Config | β | β |
| Interactive Wizard | β | β |
| Batch Creation | β | β |
| Watch Mode | β | β |
π§ Tips & Tricksβ
1. Resource Planningβ
Use resources command to understand cluster utilization before creating new VMs:
zorvia resources --all-namespaces --sort-by cpu
2. VM Templatingβ
Export an existing VM as a template:
zorvia export prod-db --output templates/database-template.yaml
# Edit template
# Use with batch command
3. Quick Cloning for Testingβ
# Clone production to staging for testing
zorvia clone prod-web staging-web
zorvia get staging-web # Verify
zorvia start staging-web # Test
4. Monitoring with Watchβ
Monitor VM startup in real-time:
zorvia status my-vm --watch --interval 2
5. Infrastructure as Codeβ
Combine batch configurations with git:
git clone https://github.com/myorg/vm-configs.git
cd vm-configs/production
zorvia batch web-cluster.yaml
π Performance Considerationsβ
Batch Operationsβ
- Batch creation is sequential (one VM at a time)
- Use
--continue-on-errorfor resilience - Consider cluster capacity before large batches
- Monitor with
resourcescommand during creation
Resource Limitsβ
- Check namespace quotas before batch creation
- Verify storage class availability
- Ensure sufficient node resources
Best Practicesβ
- Start Small: Test with 1-2 VMs before full batch
- Use Dry Run: Always verify with
--dry-runfirst - Monitor Progress: Use watch mode during creation
- Check Resources: Run
resourcesbefore and after - Validate Configs: Use
validatecommand on configs
π― Real-World Scenariosβ
Scenario 1: Web Application Clusterβ
# Create load-balanced web cluster
zorvia batch examples/batch-web-cluster.yaml
# Monitor resource usage
zorvia resources --namespace production
# Check status of all servers
for vm in web-server-{1..3}; do
zorvia status $vm
done
Scenario 2: Development Environmentβ
# Interactive creation for quick dev VM
zorvia wizard
# Clone for teammate
zorvia clone my-dev-vm teammate-dev-vm --start
# Export configuration for sharing
zorvia export my-dev-vm --output team-dev-config.yaml
Scenario 3: Disaster Recoveryβ
# Export all VMs for backup
for vm in $(zorvia list --output json | jq -r '.[].metadata.name'); do
zorvia export $vm --output backups/$vm.yaml
done
# Restore from backups
zorvia batch backups/*.yaml
Related day-2 docsβ
Many items once listed as βnextβ here now ship elsewhere:
| Capability | Where |
|---|---|
| Snapshots & retention | SNAPSHOTS.md |
| Health & monitoring | CLI zorvia health / zorvia monitor-*; web metrics |
| Live migration | CLI zorvia migrate / HA helpers |
| Web console & Fabric API | WEB_CONSOLE.md |
| Drift / plan / guest insight | DRIFT_GUARD.md, CHANGE_PLANNER.md, GUEST_INSIGHT.md |
Near-term product roadmap (registry Terraform provider, etc.) lives in the root README.md and CHANGELOG.md.
See the main README.md for basic usage, WEB_CONSOLE.md for the web API, and DEVELOPMENT.md for development details.