id: PG-09
category: compute
title: Emptying a host for patching?
situation: >-
  A compute must be rebooted for a patch. The right operation differs per instance, and Nova cannot tell
  you which workload tolerates what.

diagram:
  type: branches
  head: [The instance has, The operation is]
  split: 46
  rows:
    - see: Shared storage, or boot from volume
      means: Live migration
      sub: Keeps running, disks are not copied
      tone: ok
    - see: A local disk
      means: Live block migration
      sub: The disk is copied over the network
      tone: ok
    - see: Memory that changes faster than it copies
      means: Auto-converge or post-copy
      sub: If enabled (off by default), else cold migration
      tone: warn
    - see: PCI passthrough, SR-IOV direct port, vGPU
      means: Cold migration or restart
      sub: Live migration depends on the release
      tone: warn

checks:
  - label: What runs on the host
    hint: openstack server list --all-projects --host <host> --long
  - label: What cannot live-migrate
    hint: "port binding_vnic_type ; hostdev or mdev in the domain XML"
  - label: Where could they go?
    hint: openstack allocation candidate list --resource VCPU=<n> ...
  - label: Source and destination versions
    hint: "libvirt, QEMU, and [libvirt] cpu_mode / cpu_models"

caution:
  - level: state-changing
    text: >-
      Live migration pauses the instance at switchover (1.8 to 8.6 s on a lab). Migrate a few at once, and
      watch the destination.
  - level: destructive
    text: >-
      Cold migration and restarts stop the workload. Agree the downtime window with its owner first.

lesson: After a libvirt or QEMU patch, instances can move onto the host, not back. Plan the order.

runbook:
  path: migration/moving-instances-off-a-host-for-maintenance.md
  status: lab-verified
  release: "2026.1"
  also:
    - migration/live-migration-never-completes-or-times-out.md

scope: >-
  Derived from a patching campaign on a platform of up to several hundred hosts (release not recorded).
  Disable, live block migration and re-enable were lab-verified on 2026.1; cold migration and shared-storage
  live migration were not. Migration from a newer
  libvirt or QEMU to an older one is not supported. Constraints for PCI, SR-IOV, vGPU and CPU models depend
  on the release: check the Nova documentation of yours. A running instance keeps the old QEMU binary until
  it is migrated or restarted.

linkedin:
  title: "Emptying a compute host: one operation does not fit every instance"
  caption: |
    A compute needs a reboot for a kernel or QEMU patch. "Just live-migrate everything" is rarely the whole answer.

    The operation depends on the instance:
    → shared storage or boot from volume: live migration
    → local disk: live block migration, the disk travels over the network
    → memory changing faster than it copies: auto-converge or post-copy if enabled (off by default), else cold migration
    → PCI passthrough, SR-IOV direct ports, vGPU: cold migration or restart, depending on your release

    And one trap of every patching campaign: migration from a newer libvirt/QEMU to an older one is not supported. Once a host is patched, instances can move onto it, but not back. The order of patching decides where instances can go.

    Nova cannot tell you which workload tolerates a pause or a restart. The owning teams can.
  hashtags: [OpenStack, Nova, LiveMigration, Patching, CloudOperations, OzarLand]
