Skip to main content

πŸš€ 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​

  1. Backup: Save VM configurations before making changes
  2. Migration: Export from one cluster and import to another
  3. Version Control: Track VM configurations in git
  4. 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​

  1. Cluster Deployment: Deploy entire application stacks
  2. Testing: Create multiple test environments
  3. Development: Spin up dev clusters
  4. Demos: Quickly create demonstration environments

Best Practices​

  • Use --dry-run first to verify configuration
  • Enable --continue-on-error for large batches
  • Organize batch files by environment or purpose
  • Use meaningful VM names and labels
  • Version control your batch configurations

🎨 Features Comparison​

FeatureBasic CLIAdvanced 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-error for resilience
  • Consider cluster capacity before large batches
  • Monitor with resources command during creation

Resource Limits​

  • Check namespace quotas before batch creation
  • Verify storage class availability
  • Ensure sufficient node resources

Best Practices​

  1. Start Small: Test with 1-2 VMs before full batch
  2. Use Dry Run: Always verify with --dry-run first
  3. Monitor Progress: Use watch mode during creation
  4. Check Resources: Run resources before and after
  5. Validate Configs: Use validate command 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

Many items once listed as β€œnext” here now ship elsewhere:

CapabilityWhere
Snapshots & retentionSNAPSHOTS.md
Health & monitoringCLI zorvia health / zorvia monitor-*; web metrics
Live migrationCLI zorvia migrate / HA helpers
Web console & Fabric APIWEB_CONSOLE.md
Drift / plan / guest insightDRIFT_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.