15.4. Updating the machine type to Q35
You must record a machine type for any instance that has no machine type recorded yet. If an instance is missing this value, update the metadata to reflect its current machine type. This might be pc, virt, q35, or whatever machine type was originally used when the instance was created. As an administrator, you can use a nova-manage command to update the machine type of individual instances to q35 after the upgrade is complete.
Red Hat OpenStack Platform (RHOSP) 17 is based on RHEL 9. The pc-i440fx QEMU machine type is deprecated in RHEL 9, therefore the default machine type for x86_64 instances that run on RHEL 9 has changed from pc to q35. Based on this change in RHEL 9, the default value for machine type x86_64 has also changed from pc in RHOSP 16 to q35 in RHOSP 17.
Prerequisites
-
You have not changed the default
[libvirt]hw_machine_typetoq35. This avoids inadvertently changing the incompatible machine type to the new machine type automatically through anova-computerestart or instance reboot.
Procedure
Identify the instances that have no machine type recorded in the database:
$nova-manage libvirt list_unset_machine_typeIf you find instances that have no machine type, use the following command to record a machine type for each instance:
$nova-manage libvirt update_machine_type <instance_uuid> <machine_type>-
Replace
<instance_uuid>with the UUID of the instance. -
Replace
<machine_type>with the machine type originally used when the instance was created.
-
Replace
For each instance, show the machine type of the instance so you know what needs to be updated:
$nova-manage libvirt get_machine_type <instance_uuid>For each instance that needs to have its machine type changed to q35, complete the following steps:
Test that the OS within the instance is compatible with the new hardware:
- Create a test instance.
Verify that the test instance has a machine type other than q35:
$nova-manage libvirt get_machine_type <test_instance_uuid>Stop the test instance:
$openstack server stop <test_instance_uuid>Update the machine type of the test instance to q35:
$nova-manage libvirt update_machine_type <test_instance_uuid> q35 --forceStart the test instance:
$openstack server start <test_instance_uuid>- Verify that you can log in to the test instance and ensure that it is working as expected.
In a test environment, verify that the OS within the instance can tolerate the change without re-creation:
Stop the instance:
$openstack server stop <instance_uuid>Update the machine type and use the
--forcevalue:$nova-manage libvirt update_machine_type <instance_uuid> q35 --forceUpdate the disk controller bus and set
hw_cdrom_bustosata:$nova-manage image_property set <instance_uuid> --property hw_cdrom_bus=sataStart the instance:
$openstack server start <instance_uuid>