Spotlighted blog5 min readVCF VM + EC2 failover rehearsal

Simulate a VCF VM failover into EC2

Simulate a VCF workload failure, watch an EC2 target come online, and follow the app as the rehearsal shifts service from the on-prem lane to AWS and back again.

This rehearsal stays deliberately small. We begin on the VCF side, stand up a short-lived EC2 target, stage the app there, simulate the on-prem cut, prove the service is answering from AWS, and then tear the host back down. The goal is not a migration project. It is a compact failover story an operator can explain end to end in a few minutes.

8 stepsreadystaged simulation

This walkthrough is simulated. AWS inventory views stay unchanged after the demo.

heartbeat

200 OK

https://failover.lab.demo/health

active lane

VCF primary lane

owner: lab-web-vm

returned ip

172.26.0.4

Heartbeat is pinned to the VCF app before the cutover step.

current raw commands

Step 1/8
kubectl get pods -n lab-wm
kubectl get svc -n lab-wm
kubectl get virtualmachines -n lab-wm
01

Read the VCF baseline

Confirm the VCF workload first

ready
kubectl get pods -n lab-wm
kubectl get svc -n lab-wm
kubectl get virtualmachines -n lab-wm
02

Confirm the app is live on VCF

Confirm the VCF workload first

pending
03

Launch the EC2 failover host

Stand up the AWS failover lane

pending
04

Verify the host is healthy

Stand up the AWS failover lane

pending
05

Install the app on EC2

Stand up the AWS failover lane

pending
06

Turn off the VCF app

Flip the service and clean up

pending
07

Prove the app on EC2

Flip the service and clean up

pending
08

Tear the EC2 host back down

Flip the service and clean up

pending
>

Simulate a VCF VM failover into EC2 workflow

Expand to see the phase-by-phase operator sequence for this tab.

3 phases
>
phase 01Confirm the VCF workload firststaged

Anchor the story in the current VCF lane so the audience sees exactly what is healthy before the failover begins.

2 cmds
  1. 01
    Read the pod, service, and VM lane that currently owns the application so everyone sees the starting point clearly.
    show raw commands
    selected command
    kubectl get pods -n lab-wm
    raw step 01
    kubectl get svc -n lab-wm
    raw step 02
    kubectl get virtualmachines -n lab-wm
  2. 02
    Show the app still serving from the VCF side before any cloud actions are staged.
    show raw commands
    selected command
    curl http://lab-web-vm.lab-wm.svc.cluster.local/health
    raw step 01
    kubectl logs deploy/lab-web -n lab-wm --tail=20
>
phase 02Stand up the AWS failover lanestaged

Build the short-lived AWS landing zone, prove the host is healthy, and stage the app there before the VCF side is touched.

3 cmds
  1. 01
    Spin up the tiny EC2 target with tags and TTL so the rehearsal has a bounded cloud host to land on.
    show raw commands
    selected command
    lab aws create db-host
    raw step 01
    lab aws verify db-host
    raw step 02
    lab aws inspect ttl resources
  2. 02
    Pause long enough to show that the instance is really reachable before the app package is pushed.
    show raw commands
    selected command
    lab aws running instances
    raw step 01
    aws ec2 describe-instance-status --instance-ids <instance-id>
    raw step 02
    aws ssm describe-instance-information --filters Key=tag:Name,Values=lab-db-aws-ttl01
  3. 03
    Stage the application on the EC2 host while the VCF copy is still live so the actual cut remains brief and observable.
    show raw commands
    selected command
    aws ssm send-command --document-name AWS-RunShellScript --targets Key=tag:Name,Values=lab-db-aws-ttl01
    raw step 01
    sudo dnf install -y podman
    raw step 02
    podman run -d --name lab-failover-app -p 8080:8080 ghcr.io/lab/failover-demo:latest
>
phase 03Flip the service and clean upstaged

Cut the VCF lane, prove the app from AWS, and then tear the cloud host back down so the demo ends cleanly.

3 cmds
  1. 01
    Simulate the on-prem failure by draining the VCF app and making the cloud instance the surviving copy.
    show raw commands
    selected command
    kubectl scale deploy/lab-web --replicas=0 -n lab-wm
    raw step 01
    kubectl get pods -n lab-wm
    raw step 02
    kubectl describe deploy/lab-web -n lab-wm
  2. 02
    Read the same health surface again, but this time from the EC2 host so the audience sees the failover succeed.
    show raw commands
    selected command
    curl http://ec2-failover-target/health
    raw step 01
    aws ssm send-command --document-name AWS-RunShellScript --targets Key=tag:Name,Values=lab-db-aws-ttl01
    raw step 02
    systemctl status lab-failover-app
  3. 03
    End the rehearsal by terminating the temporary host and showing that the AWS lane returns to zero.
    show raw commands
    selected command
    lab aws kill all lab resources
    raw step 01
    lab aws terminated today
    raw step 02
    lab aws cost today
live terminalproof@lab

Simulate a VCF VM failover into EC2 terminal

Guided failover playback. Raw commands and response blocks advance automatically.

command lineidle
proof@lab$

history buffer

Run a command to capture the last five entries here. Each row stays compact until you expand it.