Problem description
Some legacy VM instances in ZStack Cloud that use Legacy BIOS adopt the pc-i440fx-rhel7.x.0-compatible machine type. This compatible machine type does not provide the device capability required by virtio-blk Discard. Some adjustment methods may change the virtual hardware configuration of a VM instance and make it inconsistent with the target compute node environment, thereby affecting live migration compatibility.
A validated Q35-compatible machine type can provide this capability. For an existing pc-i440fx-rhel7.x.0 VM instance, directly changing the compatible machine type or virtual hardware features is not recommended. Other i440fx-compatible machine types are outside the scope of this article.
Symptoms
- After TRIM/Discard is performed on a virtio-blk disk of a VM instance that uses the
pc-i440fx-rhel7.x.0-compatible machine type, backend space is not reclaimed as expected. - After the machine type or virtio-blk Discard feature of an existing VM instance is manually changed, live migration may fail.
- The migration log may contain the following keywords:
Failed to load PCIDevice:config
Failed to load virtio-blk:virtio
load of migration failed: Invalid argument
Impact
A VM instance that uses the pc-i440fx-rhel7.x.0-compatible machine type cannot reclaim backend space through virtio-blk Discard. Changing the compatible machine type or device features of an existing VM instance without validation may affect subsequent live migration.
Workaround
- When creating a VM instance that requires virtio-blk Discard, select UEFI BIOS and a Q35-compatible machine type validated for the current ZStack Cloud version.
- Do not directly change the compatible machine type, PCI topology, or virtio-blk device features of an existing
pc-i440fx-rhel7.x.0VM instance. - To switch an existing VM instance to Q35, first back up service data, create a new Q35 VM instance, and then migrate the service or data. Validate the migration plan in a non-production environment.
- After the migration is complete, perform Discard in the Guest OS and confirm that backend space is reclaimed as expected.
Affected products
- VM instances in ZStack Cloud 4.8.x, 5.4.x, and 5.5.x that use the
pc-i440fx-rhel7.x.0-compatible machine type and virtio-blk disks. - Other i440fx-compatible machine types are outside the confirmed scope of this article.
Fix status
- Current status: Confirmed; a workaround is available for new VM instances.
- Fixed version: No separate fixed version. This limitation is determined by the capabilities of the existing virtual hardware-compatible machine type.
- Related patch/fix package: None. A validated Q35-compatible machine type can be selected when creating a VM instance.
