Condensa User Guide

Introduction

Condensa is a powerful VM migration tool designed to facilitate the migration of virtual machines from various platforms (VMware, Nutanix, Sangfor, Windows Server) to Awanio cloud platform. It supports multiple migration methods including hot migration (running VMs), cold migration, and file-based migrations using OVA and VHD/VHDX formats.

Key Features

  • Hot Migration: Migrate running VMs with minimal downtime (VMware only)
  • Multi-Provider Support: VMware vSphere, OVA files, VHD/VHDX files
  • Changed Block Tracking (CBT): Efficient incremental data transfer for VMware
  • Web-Based UI: User-friendly interface for managing migrations
  • Real-time Progress Tracking: Monitor migration status and progress

Installation

Prerequisites

Before installing Condensa, ensure you have:

  1. Awanio Dashboard

    • You need to use a user that has Dashboard access privilege
  2. Helm (v3.0 or higher)

    # Install Helm if not already installed
    curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
  3. Storage Pool configured in your Awanio Dashboard

  4. Awanio API Access

    • API endpoint URL (e.g., https://192.168.1.2/v2)
    • Valid credentials for authentication

Installing via Helm

  1. Add the Condensa Helm repository:

    helm repo add condensa https://storage.awan.io/assets/charts
    helm repo update
  2. Create a values file (condensa-values.yaml):

    # REQUIRED: Public URL for Condensa (must be accessible by CDI for data imports)
    publicUrl: "http://condensa.example.com:8080"
    
    # REQUIRED: Awanio API configuration
    awanio:
      apiEndpoint: "https://192.168.1.2/v2"
      username: "your-username"
      password: "your-password"
    
    # Image configuration
    image:
      repository: registry.awan.io/images/condensa
      tag: latest
      pullPolicy: IfNotPresent
    
    # Service configuration
    service:
      type: LoadBalancer  # or NodePort, ClusterIP
      port: 8080
    
    # Storage configuration
    persistence:
      enabled: true
      storageClass: "standard"  # Your storage class
      size: 100Gi  # Storage for uploaded OVA/VHD files
    
    # Resource limits
    resources:
      requests:
        memory: "512Mi"
        cpu: "500m"
      limits:
        memory: "2Gi"
        cpu: "2000m"
    
    # Upload directory configuration
    uploadDir: "/data/uploads"
    
    # Namespace for VM migrations
    migrationNamespace: "vm-migrations"
  3. Install Condensa:

    # Create namespace
    kubectl create namespace condensa
    
    # Install with custom values
    helm install condensa condensa/condensa \
      --namespace condensa \
      --values condensa-values.yaml
  4. Verify installation:

    # Check pod status
    kubectl get pods -n condensa
    
    # Check service
    kubectl get svc -n condensa
    
    # Get the external IP/URL
    kubectl get svc condensa -n condensa -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
  5. Access the Web UI:

    Open your browser and navigate to the Condensa URL:

    http://<external-ip>:8080

Configuration Options

ParameterDescriptionDefaultRequired
publicUrlPublic URL accessible by CDI-Yes
awanio.apiEndpointAwanio API endpoint-Yes
awanio.usernameAwanio username-Yes
awanio.passwordAwanio password-Yes
persistence.enabledEnable persistent storagetrueNo
persistence.sizeStorage size for uploads100GiNo
service.typeService typeLoadBalancerNo
uploadDirDirectory for file uploads/data/uploadsNo

Preparing Source VMs

Proper preparation of source VMs is crucial for successful migration. Requirements vary by provider type.

VMware VMs

For VMware vSphere environments, especially for hot migration (migrating running VMs):

Prerequisites

  • VMware vSphere 6.0 or higher
  • VM hardware version 8 or higher
  • Administrator access to vCenter
  • Thumbprint, the SSL (SHA1) fingerprint of the remote VMware server and it is required when making a remote connection.

The following command will print the thumbprint of a VMware server called SERVER-NAME:

openssl s_client -connect SERVER-NAME:443 </dev/null |
   openssl x509 -in /dev/stdin -fingerprint -sha1 -noout

Enable Changed Block Tracking (CBT)

Important: CBT must be enabled BEFORE creating snapshots for migration.

  1. Connect to vCenter using vSphere Client

  2. Power off the VM (if running):

    Right-click VM → Power → Shut Down Guest OS
  3. Enable CBT:

    • Right-click the VM → Edit Settings
    • Click “VM Options” tab
    • Expand “Advanced”
    • Click “Edit Configuration”
    • Add the following parameter:
      ctkEnabled = true
    • Click OK to save
  4. Power on the VM:

    Right-click VM → Power → Power On
  5. Create a snapshot (REQUIRED after enabling CBT):

    Right-click VM → Snapshots → Take Snapshot
    Name: "Pre-Migration Snapshot"
    Description: "Snapshot for Condensa migration with CBT enabled"

    ⚠️ Critical: The snapshot MUST be created AFTER enabling CBT. Snapshots created before CBT enablement will cause migration failure.

  6. Verify CBT is active:

    • Check VM’s .vmdk files
    • You should see -ctk.vmdk files for each disk

Best Practices for VMware

  • Ensure VM Tools are installed and up-to-date
  • Clean up unnecessary snapshots before migration
  • Verify network connectivity between Condensa and vCenter
  • For large VMs, consider scheduling migration during maintenance windows

Nutanix VMs (OVA Export)

For migrating VMs from Nutanix AHV:

  1. Access Nutanix Prism:

    https://<nutanix-cluster-ip>:9440
  2. Prepare the VM:

    • Shut down the VM gracefully
    • Remove any unnecessary snapshots
    • Note down VM specifications (CPU, Memory, Disk)
  3. Export as OVA:

    a. Using Nutanix Move (Recommended):

    • Install Nutanix Move on a Windows/Linux machine
    • Configure source as Nutanix AHV
    • Select VMs to export
    • Choose “Export to OVA” option
    • Save to local directory

    b. Using acli (Nutanix CLI):

    # SSH to Nutanix CVM
    ssh nutanix@<cvm-ip>
    
    # List VMs
    acli vm.list
    
    # Export VM
    acli vm.export <vm-name> format=ova path=/tmp/<vm-name>.ova
    
    # Download the OVA file
    scp nutanix@<cvm-ip>:/tmp/<vm-name>.ova .
  4. Verify OVA file:

    # Check OVA contents
    tar -tvf <vm-name>.ova
    
    # Should contain:
    # - .ovf file (VM descriptor)
    # - .vmdk file(s) (Virtual disks)
    # - .mf file (Manifest)

Sangfor VMs (OVA Export)

For migrating VMs from Sangfor HCI:

  1. Access Sangfor HCI Console:

    https://<sangfor-hci-ip>
  2. Prepare the VM:

    • Stop the VM from Sangfor console
    • Remove snapshots if any
    • Document VM configuration
  3. Export Process:

    a. Navigate to Virtual Machines section

    b. Select the target VM

    c. Click More ActionsExport

    d. Choose export format:

    • Select “OVA” format
    • Include all disks
    • Include VM configuration

    e. Start export:

    Export Location: Local Computer or Network Share
    Format: OVA 1.0
    Compression: None (for better compatibility)

    f. Download the exported OVA file

  4. Post-Export Verification:

    # Verify OVA integrity
    sha256sum <vm-name>.ova
    
    # Extract and check OVF descriptor
    tar -xf <vm-name>.ova *.ovf
    cat *.ovf  # Review VM specifications

Windows Server VMs (VHD/VHDX Export)

For migrating VMs from Hyper-V on Windows Server:

From Windows Server 2012/2016/2019/2022

  1. Open Hyper-V Manager:

    # Run as Administrator
    virtmgmt.msc
  2. Prepare the VM:

    # Stop the VM
    Stop-VM -Name "VMName"
    
    # Remove checkpoints (snapshots)
    Get-VMSnapshot -VMName "VMName" | Remove-VMSnapshot
  3. Export the VM:

    Method 1: Using Hyper-V Manager GUI

    • Right-click VM → Export
    • Choose export location
    • Wait for export completion

    Method 2: Using PowerShell

    # Export entire VM
    Export-VM -Name "VMName" -Path "C:\VMExports"
    
    # Or export just the VHD/VHDX
    $vm = Get-VM -Name "VMName"
    $vhd = Get-VMHardDiskDrive -VM $vm
    Copy-Item $vhd.Path -Destination "C:\VMExports\VMName.vhdx"
  4. Convert VHDX to VHD if needed (for compatibility):

    Convert-VHD -Path "C:\VMExports\VMName.vhdx" `
                -DestinationPath "C:\VMExports\VMName.vhd" `
                -VHDType Dynamic
  5. Prepare metadata file (create vm-info.json):

    {
      "name": "VMName",
      "os_family": "windows",
      "os_version": "Windows Server 2019",
      "cpu": 4,
      "memory_mb": 8192,
      "disk_size_gb": 100,
      "architecture": "x86_64"
    }

From Azure Stack HCI

# Connect to cluster
Enter-PSSession -ComputerName <cluster-node>

# Export VM
Export-VM -Name "VMName" -Path "\\share\exports"

# Or use Windows Admin Center for GUI export

Setting Up Providers

Providers are the source platforms from which VMs will be migrated. Each provider type requires specific configuration.

VMware Provider

  1. Login to Condensa Web UI

  2. Navigate to Providers:

    • Click “Providers” in the main menu
    • Click “Add Provider” button
  3. Configure VMware Provider:

    Provider Type: VMware vSphere
    Name: vcenter-prod
    Description: Production vCenter Server
    
    Connection Details:
    - vCenter URL: https://vcenter.example.com
    - Username: administrator@vsphere.local
    - Password: ********
    - Allow Insecure: No (uncheck for production)
    
    Advanced Settings:
    - Port: 443
    - Datacenter: Datacenter-01 (optional, for filtering)
    - Concurrent Transfers: 4
  4. Test Connection:

    • Click “Test Connection”
    • Verify successful connection
    • Review discovered resources
  5. Save Provider:

    • Click “Save”
    • Provider should show “Connected” status

OVA Provider

The OVA provider handles file-based migrations using OVA files.

  1. Navigate to ProvidersAdd Provider

  2. Configure OVA Provider:

    Provider Type: OVA
    Name: ova-imports
    Description: OVA File Imports
    
    Settings:
    - Upload Directory: /data/uploads/ova
    - Max File Size: 500GB
    - Supported Formats: .ova, .ovf
  3. Upload OVA Files:

    Option 1: Web UI Upload

    • Click “Upload OVA” button
    • Select OVA file from local system
    • Add VM metadata:
      VM Name: imported-vm-01
      OS Type: Ubuntu Linux 20.04
      CPUs: 4
      Memory: 8192 MB
    • Click “Upload”

    Option 2: CLI Upload (for large files)

    # Copy to Condensa pod
    kubectl cp large-vm.ova condensa/condensa-pod:/data/uploads/ova/
    
    # Or use curl
    curl -X POST http://condensa.example.com:8080/api/v1/ova/upload \
         -H "Authorization: Bearer <token>" \
         -F "file=@large-vm.ova" \
         -F "metadata=@vm-info.json"
  4. Verify Upload:

    • Check “OVA Uploads” section
    • Verify file integrity
    • Review extracted VM specifications

VHD/VHDX Provider

The VHD provider handles migrations from Hyper-V exports.

  1. Navigate to ProvidersAdd Provider

  2. Configure VHD Provider:

    Provider Type: VHD
    Name: hyperv-imports
    Description: Hyper-V VHD Imports
    
    Settings:
    - Upload Directory: /data/uploads/vhd
    - Supported Formats: .vhd, .vhdx, .avhdx
    - Auto-convert VHDX: Yes
  3. Upload VHD Files:

    Step 1: Upload VHD/VHDX

    # Web UI for small files (<10GB)
    Navigate to "VHD Uploads" "Upload VHD"
    
    # For large files, use resumable upload
    curl -X POST http://condensa.example.com:8080/api/v1/vhd/uploads \
         -H "Content-Type: application/json" \
         -d '{
           "filename": "windows-server.vhdx",
           "vm_name": "WinServer2019",
           "os_family": "windows",
           "os_version": "Windows Server 2019",
           "num_cpu": 4,
           "memory_mb": 16384,
           "disk_size_gb": 200,
           "architecture": "x86_64"
         }'

    Step 2: Use TUS Protocol for large file upload

    # Install tus client
    npm install -g tus-js-client
    
    # Upload using resumable protocol
    tus-upload windows-server.vhdx \
      --endpoint http://condensa.example.com:8080/api/v1/tus \
      --metadata filename=d2luZG93cy1zZXJ2ZXIudmhkeA==,vm_id=<vm-uuid>
  4. Verify VHD Upload:

    • Check processing status
    • Verify disk format compatibility
    • Review VM specifications

Creating and Running Migrations

Once providers are configured and source VMs are prepared, you can create and execute migrations.

Creating a Migration

  1. Navigate to MigrationsCreate Migration

  2. Basic Configuration:

    Migration Name: prod-to-awanio-batch1
    Description: Production VMs migration batch 1
    
    Source Provider: vcenter-prod (or ova-imports, hyperv-imports)
    Target Namespace: vm-migrations
    Organization: My Organization
  3. Select VMs:

    For VMware Provider:

    • Browse available VMs
    • Use filters:
      • Datacenter
      • Folder
      • Power State
      • OS Type
    • Select VMs to migrate
    • Review VM details (CPU, Memory, Disks)

    For OVA Provider:

    • Select from uploaded OVA files
    • Verify “Ready” status
    • Review extracted specifications

    For VHD Provider:

    • Select from uploaded VHD files
    • Verify “Processed” status
    • Confirm OS compatibility
  4. Migration Settings:

    Migration Type:
    - Hot Migration (VMware only, VM stays running)
    - Cold Migration (VM powered off first)
    
    Network Mapping:
    - Source Network: VM Network → Target Network: default
    - Source Network: Management → Target Network: mgmt-net
    
    Storage Settings:
    - Storage Class: fast-ssd
    - Volume Mode: Filesystem
    - Access Mode: ReadWriteOnce
    
    Advanced Options:
    - Preserve MAC Addresses: Yes
    - Start VM after Migration: No
    - Delete Source after Success: No
  5. Review and Create:

    • Review migration summary
    • Verify resource requirements
    • Click “Create Migration”

Starting a Migration

  1. View Migration Details:

    Migrations → Select Migration → View Details
  2. Pre-flight Checks:

    • Verify source connectivity
    • Check target namespace exists
    • Validate storage availability
    • Review network mappings
  3. Start Migration:

    Option 1: Web UI

    • Click “Start Migration” button
    • Confirm action in dialog

    Option 2: CLI

    curl -X POST http://condensa.example.com:8080/api/v1/migrations/<id>/start \
         -H "Authorization: Bearer <token>"
  4. Migration Phases:

    Phase 1: Preparation

    • Create target namespace
    • Set up DataVolumes
    • Initialize transfer jobs

    Phase 2: Data Transfer

    • For VMware: VDDK transfer with CBT
    • For OVA/VHD: HTTP import via CDI
    • Progress shown in real-time

    Phase 3: Conversion

    • Convert disks to QCOW2
    • Apply OS optimizations
    • Configure drivers

    Phase 4: VM Creation

    • Create VirtualMachine CR
    • Configure networks
    • Apply resource limits

    Phase 5: Verification

    • Verify VM creation
    • Check disk attachments
    • Validate configuration

Monitoring Progress

  1. Real-time Progress:

    • View overall progress percentage
    • Monitor individual VM status
    • Check data transfer rates
    • View logs in real-time
  2. Progress Indicators:

    Overall Progress: 45%
    
    VMs Status:
    - vm-web-01: ✓ Completed (100%)
    - vm-app-01: ⟳ Transferring (67%)
    - vm-db-01: ⏸ Queued
  3. Log Viewing:

    # View migration logs
    kubectl logs -n condensa condensa-pod -f
    
    # View specific VM transfer
    kubectl get datavolume -n vm-migrations vm-web-01-disk-0 -o yaml
  4. Notifications:

    • Email alerts on completion
    • Webhook notifications
    • Slack integration (if configured)

Troubleshooting

Common Issues and Solutions

VMware Migration Fails

Issue: “CBT not enabled” error

Solution:
1. Enable CBT on source VM
2. Create new snapshot AFTER enabling CBT
3. Retry migration

Issue: “Cannot connect to vCenter”

Solution:
1. Verify network connectivity
2. Check firewall rules (port 443)
3. Verify credentials
4. Try with "Allow Insecure" if using self-signed certificates

Issue: “Snapshot not found”

Solution:
1. Create snapshot on source VM
2. Wait for snapshot to consolidate
3. Refresh provider connection

OVA Upload Issues

Issue: “Invalid OVF descriptor”

Solution:
1. Verify OVA file integrity:
   tar -tvf vm.ova
2. Extract and validate OVF:
   tar -xf vm.ova *.ovf
   xmllint --noout *.ovf
3. Re-export from source if corrupted

Issue: “Unsupported disk format”

Solution:
1. Convert disk to supported format:
   qemu-img convert -f vmdk -O qcow2 disk.vmdk disk.qcow2
2. Repackage OVA with converted disk

VHD Upload Issues

Issue: “VHD file corrupted”

Solution:
1. Verify file checksum
2. Re-export from Hyper-V
3. Try converting VHDX to VHD:
   Convert-VHD -Path source.vhdx -DestinationPath dest.vhd

Issue: “Metadata missing”

Solution:
1. Create vm-info.json with required fields
2. Upload metadata along with VHD
3. Or update via API after upload

DataVolume Stuck

Issue: DataVolume in “Pending” state

# Check DataVolume status
kubectl describe datavolume -n vm-migrations <dv-name>

# Common solutions:
1. Check PVC bound status
2. Verify storage class exists
3. Check available storage capacity
4. Review CDI pod logs:
   kubectl logs -n cdi deployment/cdi-deployment

Migration Performance Issues

Slow Transfer Rates

Solutions:
1. Enable parallel transfers (VMware)
2. Increase CDI resource limits
3. Use faster storage class
4. Check network bandwidth
5. Schedule during off-peak hours

Debug Commands

# Check Condensa logs
kubectl logs -n condensa deployment/condensa -f

# Check migration status
curl http://condensa.example.com:8080/api/v1/migrations/<id>/status

# Check DataVolume progress
kubectl get datavolume -n vm-migrations -w

# Check CDI importer pods
kubectl get pods -n vm-migrations | grep importer

# View importer logs
kubectl logs -n vm-migrations <importer-pod-name>

# Check events
kubectl get events -n vm-migrations --sort-by='.lastTimestamp'

Best Practices

Pre-Migration

  1. Capacity Planning:

    • Verify sufficient storage in target cluster
    • Plan for 2x disk space during conversion
    • Consider network bandwidth requirements
  2. VM Preparation:

    • Update VM tools/drivers
    • Clean up unnecessary files
    • Consolidate snapshots
    • Document VM dependencies
  3. Testing:

    • Test with non-critical VMs first
    • Verify migration process end-to-end
    • Document recovery procedures

During Migration

  1. Batch Processing:

    • Migrate VMs in logical groups
    • Start with less critical workloads
    • Monitor resource utilization
  2. Network Considerations:

    • Use dedicated migration network if possible
    • Configure appropriate bandwidth limits
    • Plan for network maintenance windows
  3. Monitoring:

    • Watch transfer rates
    • Monitor source system load
    • Check target cluster resources

Post-Migration

  1. Verification:

    • Verify VM functionality
    • Test application connectivity
    • Validate performance metrics
  2. Cleanup:

    • Remove successful migration DataVolumes
    • Clean up source snapshots
    • Archive migration logs
  3. Documentation:

    • Document migration issues
    • Update runbooks
    • Record performance metrics

Security Considerations

  1. Credentials:

    • Use service accounts for providers
    • Rotate credentials regularly
    • Implement RBAC policies
  2. Network Security:

    • Use TLS for all connections
    • Implement network policies
    • Restrict access to Condensa
  3. Data Protection:

    • Encrypt data in transit
    • Secure upload directories
    • Implement retention policies

Appendix

Supported Configurations

Source PlatformMigration TypeRequirements
VMware vSphere 6.0+Hot/ColdCBT, Snapshots
Nutanix AHVOVA ExportOVA 1.0/2.0
Sangfor HCIOVA ExportOVA 1.0
Hyper-V 2012+VHD ExportVHD/VHDX
Azure Stack HCIVHD ExportVHD/VHDX

API Reference

Key API endpoints for automation:

# Provider Management
GET    /api/v1/providers
POST   /api/v1/providers
DELETE /api/v1/providers/{id}

# Migration Management  
GET    /api/v1/migrations
POST   /api/v1/migrations
POST   /api/v1/migrations/{id}/start
POST   /api/v1/migrations/{id}/cancel
GET    /api/v1/migrations/{id}/status

# Upload Management
POST   /api/v1/ova/upload
POST   /api/v1/vhd/uploads
GET    /api/v1/uploads/status

Environment Variables

Configure Condensa using environment variables:

CONDENSA_PUBLIC_URL=http://condensa.example.com:8080
CONDENSA_UPLOAD_DIR=/data/uploads
AWANIO_API=https://api.awanio.com/v2
DB_PATH=/data/condensa.db
PORT=8080

Support and Resources


Last Updated: 2025 Version: 0.1.0