[Users] nested KVM

Mark Wu wudxw at linux.vnet.ibm.com
Fri Sep 28 05:56:08 UTC 2012


On 09/27/2012 03:21 PM, ybronhei wrote:
> On 09/26/2012 04:06 AM, Mark Wu wrote:
>> On 09/26/2012 12:58 AM, Nathanaël Blanchet wrote:
>>> Hello,
>>>
>>> I've tried many times to run a node as a guest in ovirt following 
>>> http://wiki.ovirt.org/wiki/Vdsm_Developers#Running_Node_as_guest_-_Nested_KVM 
>>> . The result is that I'm able to register such a host in engine, but 
>>> it is impossible to start any vm on it. If I boot on an ISO, I can 
>>> see the first prompt and move between the items. But since I begin 
>>> the installation I have a blank screen and the vm goes into pause 
>>> mode in vit-manager. Then I have no way else than rebooting the 
>>> hypervisor guest because it is impossible to resume. When I get logs 
>>> on the real host, I can find this :
>>> arning : x86Decode:1306 : Preferred CPU model Westmere not allowed 
>>> by hypervisor; closest supported model will be used
>>> Sep 25 17:11:59 khamsin libvirtd[23053]: 2012-09-25 
>>> 15:11:59.384+0000: 23054: warning : x86Decode:1306 : Preferred CPU 
>>> model Westmere not allowed by hypervisor; closest supported model 
>>> will be used
>>> Sep 25 17:12:19 khamsin libvirtd[23053]: 2012-09-25 
>>> 15:12:19.150+0000: 23055: warning : x86Decode:1306 : Preferred CPU 
>>> model Westmere not allowed by hypervisor; closest supported model 
>>> will be used
>>> Sep 25 17:45:48 khamsin libvirtd[23053]: 2012-09-25 
>>> 15:45:48.342+0000: 23058: warning : x86Decode:1306 : Preferred CPU 
>>> model Westmere not allowed by hypervisor; closest supported model 
>>> will be used
>>> Sep 25 18:07:05 khamsin libvirtd[23053]: 2012-09-25 
>>> 16:07:05.834+0000: 23058: warning : x86Decode:1306 : Preferred CPU 
>>> model Nehalem not allowed by hypervisor; closest supported model 
>>> will be used
>>> Sep 25 18:44:47 khamsin libvirtd[23053]: 2012-09-25 
>>> 16:44:47.340+0000: 23057: warning : x86Decode:1306 : Preferred CPU 
>>> model Penryn not allowed by hypervisor; closest supported model will 
>>> be used
>>>
>>> As you can see, I have tried many cpu type for launching this guest 
>>> hypervisor, but none of them is accepted by the hypervisor. Plus, 
>>> I've modified each time the family type in the cluster tab, but it 
>>> is the same.
>>> On the hist:
>>> #virsh capabilities gives
>>> <cpu>
>>> <arch>x86_64</arch>
>>> <model>Westmere</model>
>>> <vendor>Intel</vendor>
>>>
>>> Thanks for your help
>>
>>
>> What does the command 'qemu-kvm -cpu ?' give ?   Could you please try 
>> the following guest cpu definition?
>> *
>> <cpu match='exact'>
>>    <model>core2duo</model>
>>   <feature policy='require' name='vmx'/>
>> </cpu>
>>
>>
>> *
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
> I've got error too during definition of nested kvm.
>
> When i run qemu-kvm cpu ? i get: Unable to find x86 CPU definition. do 
> you know why? what does this command show?
>
> how do i add your configuration suggestion to my guest cpu?
Here's the output of  "qemu-kvm -cpu ?". It shows us which cpu models 
qemu can emulate.
x86       Opteron_G3
x86       Opteron_G2
x86       Opteron_G1
x86          Nehalem
x86           Penryn
x86           Conroe
x86           [n270]
x86         [athlon]
x86       [pentium3]
x86       [pentium2]
x86        [pentium]
x86            [486]
x86        [coreduo]
x86          [kvm32]
x86         [qemu32]
x86          [kvm64]
x86       [core2duo]
x86         [phenom]
x86         [qemu64]

You can use 'virsh edit' or edit the xml configuration file of the vm to 
specify the cpu model. Just put the cpu definition into the root 
(domain) tag.
<domain type='kvm'>
<cpu mode='custom' match='exact'>
<model fallback='allow'>core2duo</model>
<feature policy='require' name='vmx'/>
</cpu>

After that, you should be able to see it in the output of 'virsh 
dumpxml'.  And the cpuinfo from guest should read like this:

#cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
>
> -- 
> Yaniv Bronhaim.
> RedHat, Israel
> 09-7692289
> 054-7744187

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20120928/82a09677/attachment-0001.html>


More information about the Users mailing list