CLI
CLI tour
List a three-host cluster, start a VM, and live-migrate it to another host — four commands, recorded.
List the hosts, with the CPU and memory each one has in use and the litevirt version it runs.
lv host ls NAME ADDRESS STATE CPU MEMORY VMs VERSION node-1 10.0.50.11 HOST_ACTIVE 6/64 24576/262144 MiB 2 v1.0.10 node-2 10.0.50.12 HOST_ACTIVE 4/64 16384/262144 MiB 1 v1.0.10 node-3 10.0.50.13 HOST_ACTIVE 0/32 0/131072 MiB 0 v1.0.10Start a VM. No host is named, so placement puts it on node-2.
lv run --name web-01 --image ubuntu-24.04 --cpu 2 --memory 2048 VM web-01 created on node-2 (state: VM_RUNNING)Live-migrate it to node-3. Memory copies across while the VM keeps running, then one 74 ms switchover.
lv migrate web-01 node-3 live-migrating web-01: node-2 → node-3 transferring memory (2048 MiB) ▕████████████████████▏ 100% ✓ migrated — 1 switchover, 74ms downtime · web-01 now on node-3Check where it runs now.
lv ls NAME HOST STATE CPU MEMORY IP web-01 node-3 VM_RUNNING 2 2048 MiB 10.0.50.51
What happened
The recording runs against a three-host cluster. lv host ls shows each host’s CPU and memory in use. lv run creates web-01 without naming a host, so placement picks the one with room. lv migrate moves the running VM to node-3: memory copies across while the guest keeps running, then a single switchover hands it over. lv ls confirms where it landed.
Try it on your cluster
Every command takes --help. A few that pair with the ones above:
lv host ls # hosts, load, and versions
lv ls # VMs across the whole cluster
lv migrate <vm> <host> # live-migrate a running VM
lv snapshot create <vm> <name> # snapshot before you change somethingThe CLI reference lists every command and flag, and Migration and failover covers what happens when a host goes away on its own.