[Starlingx-discuss] WG: cpu mode

Chris Friesen chris.friesen at windriver.com
Mon Jan 21 15:28:05 UTC 2019


This is another assumption about Intel CPUs.  I *think* the following 
should work:

On the controllers, edit 
/usr/lib/python2.7/site-packages/nova/scheduler/filters/vcpu_model_filter.py 
(if that's not the path it should be something pretty close).  In the 
"_is_host_kvm" function add the following before the "return False" line:

     if 'svm' in info['features']:
         return True

Then, on the active controller node run "sudo sm-restart service 
nova-scheduler".  This should restart the nova scheduler, and at this 
point you should be able to schedule an instance.

Chris


On 1/21/2019 9:16 AM, von Hoesslin, Volker wrote:
> this would be very nice, but if i try to launch a vm with a flavor that contain the given extra-spec, i get this error:
> 
> No valid host was found. There are not enough hosts available. compute-0: (VCpuModelFilter) Passthrough VCPU Model only available on 'kvm' hosts, compute-1: (VCpuModelFilter) Passthrough VCPU Model only available on 'kvm' hosts
> 
> volker...
> ________________________________________
> Von: Chris Friesen [chris.friesen at windriver.com]
> Gesendet: Montag, 21. Januar 2019 16:09
> An: starlingx-discuss at lists.starlingx.io
> Betreff: Re: [Starlingx-discuss] WG: cpu mode
> 
> You shouldn't need to modify nova.conf.
> 
> With the current codebase you should be able to specify
> "hw:cpu_model=Passthrough" in the flavor extra-specs.
> 
> Chris
> 
> On 1/21/2019 8:30 AM, von Hoesslin, Volker wrote:
>> i have set "host-passthrough" in "/etc/nova/nova.conf"
>>
>> =================================
>> [DEFAULT]
>> libvirt_cpu_mode = host-passthrough
>>
>> [libvirt]
>> cpu_mode = host-passthrough
>> =================================
>>
>> and restart nove service:
>> # service nova-compute restart
>>
>> for now it works! "lscpu" on guest os shows me the AMD EPIC with all features, very nice. but after reboot the compute-node, the auto-config script change this setting back to "none":
>>
>> [libvirt]
>> cpu_mode = none
>>
>> and passthrough did not work anymore :( so how can i prevent this auto-config or define my new config as persistent?
> 
> 
> 
> _______________________________________________
> Starlingx-discuss mailing list
> Starlingx-discuss at lists.starlingx.io
> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
> 




More information about the Starlingx-discuss mailing list