Passing Flags from host machine to the Guest VM
Problem
Some CPUs do not pass the host machine CPU flags to the guest VMs by default. Which causes guest VMs unable to support that flags.
Environment
- Platform9 Managed OpenStack - v4.0 and Higher
- Host machine - model name : Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz
- Guest VM - model name : QEMU Virtual CPU version 2.5+
Procedure
We need to pass the flags as extra parameters to resolve this issue. As shown in the below example guest VM was not getting avx flag from host, so we have passed the flag using cpu_model_extra_flags
in "nova_override.conf".
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl xtopology eagerfpu pni cx16 x2apic hypervisor lahf_lm
//deleted some flags
flags : avx avx2 avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl
Now, passing the flags in "/opt/pf9/etc/nova/conf.d/nova_override.conf" file as shown below:
[libvirt]
cpu_mode = host-model
cpu_model_extra_flags = avx
After updating the file restart the pf9-ostackhost service and reboot the guest VM.
x
# sudo systemctl restart pf9-ostackhost
# openstack server reboot --hard [Instance_UUID]
Now, guest VM will start showing that flags.
Was this page helpful?