Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 11. Enabling RT-KVM for NFV Workloads
To facilitate installing and configuring Red Hat Enterprise Linux Real Time KVM (RT-KVM), Red Hat OpenStack Platform provides the following features:
- A real-time Compute node role that provisions Red Hat Enterprise Linux for real-time.
- The additional RT-KVM kernel module.
- Automatic configuration of the Compute node.
11.1. Planning for your RT-KVM Compute nodes
When planning for RT-KVM Compute nodes, ensure that the following tasks are completed:
- You must use Red Hat certified servers for your RT-KVM Compute nodes. - For more information, see Red Hat Enterprise Linux for Real Time certified servers. 
- Register your undercloud and attach a valid Red Hat OpenStack Platform subscription. - For more information, see Registering the undercloud and attaching subscriptions in the Director Installation and Usage guide. 
- Enable the repositories that are required for the undercloud, such as the - rhel-9-server-nfv-rpmsrepository for RT-KVM, and update the system packages to the latest versions.Note- You need a separate subscription to a - Red Hat OpenStack Platform for Real TimeSKU before you can access this repository.- For more information, see Enabling repositories for the undercloud in the Director Installation and Usage guide. 
Building the real-time image
- Install the libguestfs-tools package on the undercloud to get the virt-customize tool: - sudo dnf install libguestfs-tools - (undercloud) [stack@undercloud-0 ~]$ sudo dnf install libguestfs-tools- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Important- If you install the - libguestfs-toolspackage on the undercloud, disable- iscsid.socketto avoid port conflicts with the- tripleo_iscsidservice on the undercloud:- sudo systemctl disable --now iscsid.socket - $ sudo systemctl disable --now iscsid.socket- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Extract the images: - tar -xf /usr/share/rhosp-director-images/overcloud-full.tar tar -xf /usr/share/rhosp-director-images/ironic-python-agent.tar - (undercloud) [stack@undercloud-0 ~]$ tar -xf /usr/share/rhosp-director-images/overcloud-full.tar (undercloud) [stack@undercloud-0 ~]$ tar -xf /usr/share/rhosp-director-images/ironic-python-agent.tar- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Copy the default image: - cp overcloud-hardened-uefi-full.qcow2 overcloud-realtime-compute.qcow2 - (undercloud) [stack@undercloud-0 ~]$ cp overcloud-hardened-uefi-full.qcow2 overcloud-realtime-compute.qcow2- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Register your image to enable Red Hat repositories relevant to your customizations. Replace - [username]and- [password]with valid credentials in the following example.- virt-customize -a overcloud-realtime-compute.qcow2 --run-command \ 'subscription-manager register --username=[username] --password=[password]' \ subscription-manager release --set 8.4 - virt-customize -a overcloud-realtime-compute.qcow2 --run-command \ 'subscription-manager register --username=[username] --password=[password]' \ subscription-manager release --set 8.4- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- For security, you can remove credentials from the history file if they are used on the command prompt. You can delete individual lines in history using the - history -dcommand followed by the line number.
- Find a list of pool IDs from your account’s subscriptions, and attach the appropriate pool ID to your image. - sudo subscription-manager list --all --available | less ... virt-customize -a overcloud-realtime-compute.qcow2 --run-command \ 'subscription-manager attach --pool [pool-ID]' - sudo subscription-manager list --all --available | less ... virt-customize -a overcloud-realtime-compute.qcow2 --run-command \ 'subscription-manager attach --pool [pool-ID]'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Add the repositories necessary for Red Hat OpenStack Platform with NFV. - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create a script to configure real-time capabilities on the image. - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Run the script to configure the real-time image: - virt-customize -a overcloud-realtime-compute.qcow2 -v --run rt.sh 2>&1 | tee virt-customize.log - (undercloud) [stack@undercloud-0 ~]$ virt-customize -a overcloud-realtime-compute.qcow2 -v --run rt.sh 2>&1 | tee virt-customize.log- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- If you see the following line in the - rt.shscript output,- "grubby fatal error: unable to find a suitable template", you can ignore this error.
- Examine the - virt-customize.logfile that resulted from the previous command, to check that the packages installed correctly using the- rt.shscript .- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Relabel SELinux: - virt-customize -a overcloud-realtime-compute.qcow2 --selinux-relabel - (undercloud) [stack@undercloud-0 ~]$ virt-customize -a overcloud-realtime-compute.qcow2 --selinux-relabel- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Extract vmlinuz and initrd: - mkdir image guestmount -a overcloud-realtime-compute.qcow2 -i --ro image cp image/boot/vmlinuz-3.10.0-862.rt56.804.el7.x86_64 ./overcloud-realtime-compute.vmlinuz cp image/boot/initramfs-3.10.0-862.rt56.804.el7.x86_64.img ./overcloud-realtime-compute.initrd guestunmount image - (undercloud) [stack@undercloud-0 ~]$ mkdir image (undercloud) [stack@undercloud-0 ~]$ guestmount -a overcloud-realtime-compute.qcow2 -i --ro image (undercloud) [stack@undercloud-0 ~]$ cp image/boot/vmlinuz-3.10.0-862.rt56.804.el7.x86_64 ./overcloud-realtime-compute.vmlinuz (undercloud) [stack@undercloud-0 ~]$ cp image/boot/initramfs-3.10.0-862.rt56.804.el7.x86_64.img ./overcloud-realtime-compute.initrd (undercloud) [stack@undercloud-0 ~]$ guestunmount image- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- The software version in the - vmlinuzand- initramfsfilenames vary with the kernel version.
- Upload the image: - openstack overcloud image upload --update-existing --os-image-name overcloud-realtime-compute.qcow2 - (undercloud) [stack@undercloud-0 ~]$ openstack overcloud image upload --update-existing --os-image-name overcloud-realtime-compute.qcow2- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
				You now have a real-time image you can use with the ComputeOvsDpdkRT composable role on your selected Compute nodes.
			
Modifying BIOS settings on RT-KVM Compute nodes
To reduce latency on your RT-KVM Compute nodes, disable all options for the following parameters in your Compute node BIOS settings:
- Power Management
- Hyper-Threading
- CPU sleep states
- Logical processors
11.2. Configuring OVS-DPDK with RT-KVM
You must determine the best values for the OVS-DPDK parameters that you set in the network-environment.yaml file to optimize your OpenStack network for OVS-DPDK. For more details, see Deriving DPDK parameters with workflows.
11.2.1. Generating the ComputeOvsDpdk composable role
					Use the ComputeOvsDpdkRT role to specify Compute nodes for the real-time compute image.
				
					Generate roles_data.yaml for the ComputeOvsDpdkRT role.
				
(undercloud) [stack@undercloud-0 ~]$ openstack overcloud roles generate -o roles_data.yaml Controller ComputeOvsDpdkRT
# (undercloud) [stack@undercloud-0 ~]$ openstack overcloud roles generate -o roles_data.yaml Controller ComputeOvsDpdkRT11.2.2. Configuring the OVS-DPDK parameters
						Determine the best values for the OVS-DPDK parameters in the network-environment.yaml file to optimize your deployment. For more information, see Section 9.1, “Deriving DPDK parameters with workflows”.
					
- Add the NIC configuration for the OVS-DPDK role you use under - resource_registry:- resource_registry: # Specify the relative/absolute path to the config files you want to use for override the default. OS::TripleO::ComputeOvsDpdkRT::Net::SoftwareConfig: nic-configs/compute-ovs-dpdk.yaml OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml - resource_registry: # Specify the relative/absolute path to the config files you want to use for override the default. OS::TripleO::ComputeOvsDpdkRT::Net::SoftwareConfig: nic-configs/compute-ovs-dpdk.yaml OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Under - parameter_defaults, set the OVS-DPDK, and RT-KVM parameters:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
11.2.3. Deploying the overcloud
Deploy the overcloud for ML2-OVS:
11.3. Launching an RT-KVM instance
Perform the following steps to launch an RT-KVM instance on a real-time enabled Compute node:
- Create an RT-KVM flavor on the overcloud: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Launch an RT-KVM instance: - openstack server create --image <rhel> --flavor r1.small --nic net-id=<dpdk-net> test-rt - # openstack server create --image <rhel> --flavor r1.small --nic net-id=<dpdk-net> test-rt- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To verify that the instance uses the assigned emulator threads, run the following command: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow