Description of problem:
After installing Fedora 21 Workstation Alpha on Lenovo Thinkpad T410. virt-manager is not able to create any VM.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install Fedora 21 Alpha on T410
2. Try to create VM on virt-manager
3. Get to the end of the wizard
It fails with error "internal error: Cannot find suitable CPU model for given data"
It should create the VM.
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 1854, in do_install
File "/usr/share/virt-manager/virtinst/guest.py", line 411, in start_install
File "/usr/share/virt-manager/virtinst/guest.py", line 475, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3361, in
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
libvirtError: internal error: Cannot find suitable CPU model for given data
On "systemctl status libvirtd" I can see:
Nov 04 10:23:41 lappie.mkeder.com libvirtd: Preferred CPU model
Westmere not allowed by hypervisor; closest supported model will be
Nov 04 10:23:41 lappie.mkeder.com libvirtd: internal error:
Cannot find suitable CPU model for given data
I haven't tried Fedora 20 on it but I might re-install it soon. Just
wanted to give my feedback for Fedora 21.
Doing a google search it seems that some people had the same problem a
few months ago and they solved but by updating. Seems to be some sort
of problem between libvirt and qemu-kvm. Like this:
Logs are on fpaste:
virsh capabilities -> http://paste.fedoraproject.org/147736/15110815/
libvirtd debug -> http://fpaste.org/147741/51114361/
This was fixed by stopping libvirt, removing all files on /var/cache/libvirt/qemu/capabilities/ and starting it again.
After the installation on Fedora 21 Alpha, when trying to create the VM the first time the BIOS setting for Intel Virtualization was disabled. After I enabled it I was getting the error reported on this bug. It was fixed by removing the cached files.
It will be good if the cache files are cleaned up on this error or something so this doesn't happen to an average user.
Created attachment 953648 [details]
libvirtd log with intel-vt disabled
libvirtd log with intel-vt disabled
Created attachment 953657 [details]
So the problem is in the /usr/bin/qemu-kvm wrapper, which runs qemu-system-x86_64 with -machine accel=kvm to force KVM. When libvirt starts, it probes QEMU binaries by running them with "-S -no-user-config -nodefaults -nographic -M none -qmp ... -pidfile ... -daemonize" to get a dummy process with QMP monitor which we can ask for available QMP commands, machine types, and lots of other things. Howver, when qemu-kvm wrapper forces the dummy process to enable KVM, it fails to start if KVM cannot be enabled for some reason (missing module, disabled by BIOS, ...). If that happens, we fall back to the old way of parsing -help, -cpu ?, etc. output. And since we implemented QMP probing for QEMU 1.2.0, we don't keep up with any changes made in "-cpu ?" output and thus fail to parse it properly. But we shouldn't even try to use the old way of probing QEMU capabilities because we know it's not going to work...
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2014-November/msg00407.html
Another option could be to alter the qemu-kvm wrapper script and change it to not use accel=kvm if -nodefaults is passed, that way we don't need to work around it in libvirt
(Although that patch looks useful anyways)
Can't the qemu-kvm wrapper simply use accel=kvm:tcg, and fallback to TCG if KVM is not available? (Wasn't it the behavior of qemu-kvm in the past, before the upstream merge?)
Pushed upstream as v1.2.10-104-gae3e29e6:
Author: Jiri Denemark <jdenemar>
Date: Wed Nov 12 16:49:59 2014 +0100
qemu: Don't try to parse -help for new QEMU
Since QEMU 1.2.0, we switched to QMP probing instead of parsing -help
(and other commands, such as -cpu ?) output. However, if QMP probing
failed, we still tried starting QEMU with various options and parsing
the output, which was guaranteed to fail because the output changed.
Let's just refuse parsing -help for QEMU >= 1.2.0.
Signed-off-by: Jiri Denemark <jdenemar>
libvirt-18.104.22.168-1.fc21 has been submitted as an update for Fedora 21.
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-22.214.171.124-1.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
libvirt-126.96.36.199-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.