Migration hosts enable direct data transfer from ESXi hosts, bypassing vCenter for improved performance and control. This chapter covers the complete lifecycle management of migration hosts, which are exclusive to vSphere environments.
Overview and Purpose of Migration Hosts
What are Migration Hosts?
Migration hosts are specialized resources that enable Forklift to establish direct connections to ESXi hosts, providing:
Direct ESXi Access: Bypass vCenter for data transfer operations
Performance Optimization: Reduce network hops and potential bottlenecks
Network Control: Specify which ESXi network interface to use for migration
Enhanced Throughput: Direct host-to-host data transfer capabilities
How Migration Hosts Work
By creating host resources, Forklift can utilize ESXi host interfaces directly for network transfer to OpenShift, provided the OpenShift worker nodes and ESXi host interfaces have network connectivity. This is particularly beneficial when users want to control which specific ESXi interface is used for migration, even without direct access to ESXi host credentials.
Requirements and Limitations
vSphere Only: Migration hosts are exclusively supported for vSphere providers
Network Connectivity: OpenShift worker nodes must have network connectivity to ESXi host interfaces
Host ID Matching: The --host-id flag requires inventory host IDs (e.g. host-8), NOT display names or IP addresses. Use kubectl-mtv get inventory host --provider <name> to list available IDs
Provider Dependency: Hosts must be associated with an existing vSphere provider
How-To: Creating Hosts
Basic Syntax
1
kubectl mtv create host --host-id HOST_ID[,HOST_ID,...] --provider PROVIDER_NAME [options]
Important: The --host-id flag expects inventory host IDs (e.g. host-8, host-12),
which are vSphere managed object references. These are NOT the same as display names or IP
addresses. Run kubectl-mtv get inventory host --provider <name> to discover available IDs.
Multiple host IDs are passed as a comma-separated list (e.g., --host-id host-8,host-12,host-15).
You can also use --host-ids as an alias.
IP Address Resolution Methods
Migration hosts support two methods for IP address resolution:
Method 1: Direct IP Address (–ip-address)
Specify the exact IP address to use for the migration host:
1
2
3
4
5
6
7
8
9
# Single host with direct IP
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--ip-address 192.168.1.10
# Multiple hosts with same IP (load balancer scenario)
kubectl mtv create host --host-id host-8,host-12,host-15 \--provider vsphere-provider \--ip-address 192.168.1.100
# Skip TLS verification for host connections (testing only)
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--username root \--password TestPassword \--ip-address 192.168.100.10 \--host-insecure-skip-tls# Provide CA certificate for host authentication
kubectl mtv create host --host-id host-12 \--provider vsphere-provider \--username root \--password ProdPassword \--ip-address 192.168.1.10 \--cacert @/path/to/esxi-ca-certificate.pem
# Inline CA certificate
kubectl mtv create host --host-id host-12 \--provider vsphere-provider \--username root \--password ProdPassword \--ip-address 192.168.1.10 \--cacert"-----BEGIN CERTIFICATE-----
MIIGBzCCA++gAwIBAgIJAKt..."
Bulk Host Creation
Create multiple hosts efficiently:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Multiple hosts with same configuration
kubectl mtv create host \--host-id host-8,host-12,host-15,host-20 \--provider vsphere-cluster-provider \--existing-secret esxi-cluster-secret \--network-adapter"Management Network"# Hosts in different clusters but same authentication
kubectl mtv create host \--host-id host-8,host-12,host-30,host-35 \--provider vsphere-multi-cluster \--username cluster-admin \--password ClusterPassword \--network-adapter"vMotion"
Host Creation with Custom Inventory URL
1
2
3
4
5
6
7
8
9
10
11
# Specify custom inventory service URL
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--ip-address 192.168.1.10 \--inventory-url http://custom-inventory.internal:8080
# Use environment variable for inventory URLexport MTV_INVENTORY_URL=http://inventory-service.forklift:8080
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--ip-address 192.168.1.10
Listing, Describing, and Deleting Hosts
List Migration Hosts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# List all hosts in current namespace
kubectl mtv get hosts
# List hosts in specific namespace
kubectl mtv get hosts --namespace migration-namespace
# List hosts across all namespaces
kubectl mtv get hosts --all-namespaces# List with detailed output
kubectl mtv get hosts --output yaml
kubectl mtv get hosts --output json
# List specific host
kubectl mtv get host --name esxi-host-01
Describe Migration Hosts
Get detailed information about migration hosts:
1
2
3
4
5
# Describe a specific host
kubectl mtv describe host --name esxi-host-01
# View host configuration and status
kubectl get host esxi-host-01 -o yaml
Delete Migration Hosts
1
2
3
4
5
6
7
8
9
10
11
# Delete a specific host
kubectl mtv delete host --name esxi-host-01
# Delete multiple hosts
kubectl mtv delete hosts --name esxi-host-01,esxi-host-02,esxi-host-03
# Delete all hosts in namespace (use with caution)
kubectl mtv delete host --all# Plural form for single or multiple
kubectl mtv delete hosts --name esxi-host-01
Best Practices for Host Creation
Network Planning and Design
Dedicated Migration Networks:
1
2
3
4
5
# Use dedicated network adapters for migration traffic
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--network-adapter"Migration Network"\--existing-secret migration-credentials
# Separate production and development hosts
kubectl mtv create host --host-id host-8 \--provider vsphere-prod \--network-adapter"Prod Migration Net"\--namespace production
kubectl mtv create host --host-id host-20 \--provider vsphere-dev \--network-adapter"Dev Migration Net"\--namespace development
Security Best Practices
Credential Management:
1
2
3
4
5
6
7
8
9
# Use dedicated service accounts for migration
kubectl create secret generic esxi-migration-creds \--from-literal=user=svc-migration \--from-literal=password=$(openssl rand -base64 32)
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--existing-secret esxi-migration-creds \--ip-address 192.168.1.10
Certificate Validation:
1
2
3
4
5
6
7
# Always use CA certificates in production
kubectl mtv create host --host-id host-12 \--provider vsphere-provider \--username svc-migration \--password SecurePassword \--ip-address 192.168.1.10 \--cacert @/secure/esxi-ca.pem
# Distribute hosts across different network segments
kubectl mtv create host --host-id host-8 \--provider vsphere-provider \--network-adapter"Rack1 Migration"\--existing-secret rack1-creds
kubectl mtv create host --host-id host-20 \--provider vsphere-provider \--network-adapter"Rack2 Migration"\--existing-secret rack2-creds
Provider Endpoint Optimization:
1
2
3
4
5
6
7
8
9
10
11
# Use ESXi endpoint providers for direct host access
kubectl mtv create provider --name esxi-direct --type vsphere \--url https://esxi-host.example.com/sdk \--sdk-endpoint esxi \--username root \--password DirectPassword
# Create host using ESXi endpoint provider
kubectl mtv create host --host-id host-8 \--provider esxi-direct \--ip-address 192.168.1.10
Monitoring and Validation
Host Connectivity Testing:
1
2
3
4
5
6
7
8
# Verify host creation and status
kubectl mtv describe host --name esxi-host-01
# Check underlying Kubernetes resource
kubectl get host esxi-host-01 -o yaml
# Monitor host events
kubectl get events --field-selector involvedObject.name=esxi-host-01
Network Connectivity Validation:
1
2
3
4
5
6
# Test connectivity from OpenShift worker nodes# This should be done from the cluster nodesfor node in$(kubectl get nodes -o name);do
kubectl debug $node-it--image=nicolaka/netshoot --\
ping -c 3 192.168.1.10
done
# Step 1: Create vSphere provider for cluster
kubectl mtv create provider --name vsphere-cluster --type vsphere \--url https://vcenter.prod.company.com/sdk \--username svc-migration@vsphere.local \--password$(cat /secure/vcenter-password)\--vddk-init-image quay.io/company/vddk:8.0.1
# Step 2: Create shared credentials for ESXi hosts
kubectl create secret generic esxi-cluster-creds \--from-literal=user=migration-svc \--from-literal=password=$(cat /secure/esxi-password)# Step 3: Create migration hosts for each ESXi server (use IDs from 'get inventory host')
kubectl mtv create host \--host-id host-8,host-12,host-15,host-20 \--provider vsphere-cluster \--existing-secret esxi-cluster-creds \--network-adapter"Migration Network"\--cacert @/secure/esxi-ca.pem
# Step 4: Verify host creation
kubectl mtv get hosts
kubectl mtv describe host --name esxi-prod-01
Example 2: Development Environment Setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Step 1: Create development vSphere provider
kubectl mtv create provider --name vsphere-dev --type vsphere \--url https://vcenter-dev.internal/sdk \--username administrator@vsphere.local \--password DevPassword123 \--provider-insecure-skip-tls# Step 2: Create development hosts with relaxed security (use IDs from 'get inventory host')
kubectl mtv create host --host-id host-8,host-12 \--provider vsphere-dev \--username root \--password DevHostPassword \--network-adapter"VM Network"\--host-insecure-skip-tls\--namespace development
# Step 3: Verify setup
kubectl mtv get hosts --namespace development
Example 3: Multi-Site Migration Setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Site A hosts (use IDs from 'get inventory host --provider vsphere-site-a')
kubectl mtv create host \--host-id host-8,host-12 \--provider vsphere-site-a \--ip-address 10.1.1.10 \--existing-secret site-a-creds
# Site B hosts (use IDs from 'get inventory host --provider vsphere-site-b')
kubectl mtv create host \--host-id host-30,host-35 \--provider vsphere-site-b \--ip-address 10.2.1.10 \--existing-secret site-b-creds
# Verify multi-site setup
kubectl mtv get hosts --all-namespaces
Troubleshooting Migration Hosts
Common Host Issues
Host Creation Failures
1
2
3
4
5
6
7
8
9
# Check provider status
kubectl mtv describe provider --name vsphere-provider
# List available host IDs from inventory
kubectl mtv get inventory host --provider vsphere-provider
# Check network connectivity
kubectl debug node-name -it--image=nicolaka/netshoot --\
ping -c 3 192.168.1.10
Authentication Problems
1
2
3
4
5
6
7
8
# Verify secret contents
kubectl get secret esxi-host-secret -o yaml
# Test ESXi connectivity manually
curl -k-u root:password https://192.168.1.10/sdk
# Check host events for authentication errors
kubectl get events --field-selector involvedObject.name=esxi-host-01
Network Adapter Issues
1
2
3
4
5
# List available network adapters
kubectl mtv get inventory networks --provider vsphere-provider
# Verify network adapter name matches inventory
kubectl mtv get inventory hosts --provider vsphere-provider --output yaml | grep-A5 networks
Host Status Monitoring
1
2
3
4
5
6
7
8
# Monitor host status
kubectl mtv get hosts --watch# Check detailed host information
kubectl get host esxi-host-01 -o yaml
# View host conditions and events
kubectl describe host esxi-host-01
Migration hosts automatically integrate with migration plans when available:
1
2
3
4
5
6
7
# Create migration plan - will automatically use available hosts
kubectl mtv create plan --name migration-with-hosts \--source vsphere-provider \--vms"vm1,vm2,vm3"# The plan will automatically leverage created migration hosts# for improved performance during disk transfer operations