11.3. 启动 RT-KVM 实例
执行以下步骤在实时启用的 Compute 节点上启动 RT-KVM 实例:
在 overcloud 中创建 RT-KVM 类别:
# openstack flavor create r1.small 99 4096 20 4 # openstack flavor set --property hw:cpu_policy=dedicated 99 # openstack flavor set --property hw:cpu_realtime=yes 99 # openstack flavor set --property hw:mem_page_size=1GB 99 # openstack flavor set --property hw:cpu_realtime_mask="^0-1" 99 # openstack flavor set --property hw:cpu_emulator_threads=isolate 99
启动 RT-KVM 实例:
# openstack server create --image <rhel> --flavor r1.small --nic net-id=<dpdk-net> test-rt
要验证实例是否使用分配的仿真程序线程,请运行以下命令:
# virsh dumpxml <instance-id> | grep vcpu -A1 <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='1'/> <vcpupin vcpu='1' cpuset='3'/> <vcpupin vcpu='2' cpuset='5'/> <vcpupin vcpu='3' cpuset='7'/> <emulatorpin cpuset='0-1'/> <vcpusched vcpus='2-3' scheduler='fifo' priority='1'/> </cputune>