cirros image fails to boot when libvirt.cpu_mode=custom and libvirt.cpu_model=pentium

Bug #1412994 reported by jiang, yunhong
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

I try to set the libvirt.cpu_mode=custom and libvirt.cpu_model=pentium, and then boot a vm using cirros image. The 'nova boot' command create the instance successfully while the instance failed to boot because the image requires x86_64 while pentium has no x86_64 support.

Then I try to set the image's architecture property to be x86_64, with "glance image-update IMG-UUID --property architecture=x86_64". After this, the instance is created successfully by 'nova boot' but instance still fails to boot.

I think the reason is because, when libvirt_cpu_model=perntium, the compute node should in fact report it's capability as that of Pertium processor, instead of the host processor anymore.

Revision history for this message
Joe Gordon (jogo) wrote :

Without any log files and knowing which version this is on, this bug is difficult to triage.

Changed in nova:
status: New → Incomplete
Revision history for this message
jiang, yunhong (yunhong-jiang) wrote :

More information:

environment:
It's in the trunk of nova with libvirt virt driver. The hardware is latest Intel CPU feature with x86_64 support for sure.

a) nova conf:
[libvirt]
......
cpu_mode = custom
cpu_model=pentium
virt_type = kvm
...

b) mark the image as x86_64:
glance image-update 4d677ad0-47f5-4294-bb8e-d416735199c3 --property architecture=x86_64

c) start an VM

nova boot --image cirros-0.3.2-x86_64-uec --flavor m1.small 125

d) nova list:
the instance is up.
|3c5acf31-ebf9-48db-9d47-9d37e010e3dd | 125 | ACTIVE | - | Running | private=10.0.0.4 |

e) failed to ssh to the guest, but vnc to the guest show:
The guest OS failed to boot with information that "This kernel requires an x86-64 CPU, but only detected an i586 CPU.".

Revision history for this message
Daniel Berrange (berrange) wrote :

IMHO this is just user error - don't ask for such an outdated CPU model - use one of the sensible modern models - Nehlem, Haswell, SandyBridge, etc.

Revision history for this message
jiang, yunhong (yunhong-jiang) wrote :

I think the key point is, if we configure the host cpu_model, then we should expose the cpu_feature information of the cpu_model one, instead of the real host CPU features. So that compute_capability filter will not make wrong decision.

The pentium is just a extreme case. Considering some specific CPU features like SSE4.1. If host has SSE4.1 but the libvirt.cpu_model will disable it. The nova will still assign the host to a guest requesting SSE4.1 features.

Revision history for this message
Sean Dague (sdague) wrote :

Could be a feature for the safety check here

Changed in nova:
status: Incomplete → Opinion
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.