[openstack-dev] [nova][libvirt]How to customize cpu features in nova

Steve Gordon sgordon at redhat.com
Tue Dec 23 14:58:45 UTC 2014


----- Original Message -----
> From: "CloudBeyond" <cloudbeyond at gmail.com>
> To: openstack-dev at lists.openstack.org
> 
> Dear Developers,
> 
> Sorry for interrupting if i sent to wrong email group, but i got a problem on
> running Solaris 10 on icehouse openstack.
>  I found it is need to disable CPU feature x2apic so that solaris 10 NIC
> could work in KVM as following code in libvirt.xml
> 
>   <cpu mode="custom" match="exact">
>     <model>SandyBridge</model>
>     <vendor>Intel</vendor>
>     <feature policy='disable' name='x2apic'/>
>   </cpu>
> 
> if without line
>   <feature policy='disable' name='x2apic'/>
> the NIC in Solaris could not work well.
> 
> And I try to migrate the KVM libvirt xml to Nova. I found only two options
> to control the result.
> 
> First I used default setting cpu_mdoe = None in nova.conf , the Solaris 10
> would keep rebooting before enter desktop env.
> 
> And then I set cpu_mode = custom, cpu_model = SandyBridge. Solaris 10 could
> start up but NIC not work.
> 
> I also set cpu_mode = host-model, cpu_model = None. Solaris 10 could work
> but NIC not.
> 
> I read the code located
> in /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py. Is that
> possible to do some hacking to customize the cpu feature?

It's possible though as you note requires modification of the driver, if you want to try and do this in a way that is compatible with other efforts to handle guest OS specific customizations you might want to review this proposal:

    https://review.openstack.org/#/c/133945/4

-Steve



More information about the OpenStack-dev mailing list