Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot upgrade to qemu 2.0 because of old libvirt domains
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 62

PostPosted: Thu Jun 05, 2014 1:48 pm    Post subject: Cannot upgrade to qemu 2.0 because of old libvirt domains Reply with quote

Hi,

When I run "emerge -uvADN --with-bdeps y @world" today, emerge wants to upgrade qemu from 1.7.0 to 2.0.0. However, the upgrade is immediately stopped again with the following message:

Code:

 * The kvm/qemu-kvm wrappers no longer exist, but your libvirt
 * instances are still pointing to it.  Please update your
 * configs in /etc/libvirt/qemu/ to use the -enable-kvm flag
 * and the right system binary (e.g. qemu-system-x86_64).
 * ERROR: app-emulation/qemu-2.0.0::gentoo failed (pretend phase):
 *   update your virt configs to not use qemu-kvm


So I looked the files in that directory, and they indeed have a line "<emulator>/usr/bin/qemu-kvm</emulator>" (in the devices section, for some reason...), but they also have this comment at the top of the file:

Code:

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit drqueue_xp_slave
or other application using the libvirt API.
-->


So I started editing my domains (none of them running at that point, btw) in virsh instead, simply removing the "<emulator>/usr/bin/qemu-kvm</emulator>" line. Except the change didn't take. libvirt will immediately add that back again after saving.

So, how do I tell libvirt it's not supposed to use the qemu-kvm wrapper?
Back to top
View user's profile Send private message
greyhare
n00b
n00b


Joined: 05 Jun 2014
Posts: 3

PostPosted: Thu Jun 05, 2014 5:15 pm    Post subject: Reply with quote

It's a pathetic message, which assumes you're running qemu from the command line. The wiki page says nothing. But I managed to guess my way to the answer.

Using virtsh, you have to replace this:
Code:
<emulator>/usr/bin/qemu-kvm</emulator>

with something like this:
Code:
<emulator>/usr/bin/qemu-system-x86_64</emulator>

Apparently libvirt takes care of adding the -enable-kvm flag for you.

This change allowed qemu-2.0.0 to emerge successfully, with the following helpfully useless (i.e. post-hoc) message:
Code:
 * Migration from qemu-kvm instances and loading qemu-kvm created
 * save states has been removed starting with the 1.6.2 release
 *
 * It is recommended that you migrate any VMs that may be running
 * on qemu-kvm to a host with a newer qemu and regenerate
 * any saved states with a newer qemu.
 *
 * qemu-kvm was the primary qemu provider in Gentoo through 1.2.x
 *
 * The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer
 * installed.  In order to use kvm acceleration, pass the flag
 * -enable-kvm when running your system target.

They say "migrate" like it's a far more involved process than changing one line in an XML file. So I'm hoping something doesn't break.

If this is all it was, I don't know why there wasn't some kind of automatic fix using sed or equivalent in the libvirt (or something) ebuild. Or at least an item in eselect news.
Back to top
View user's profile Send private message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 62

PostPosted: Fri Jun 06, 2014 8:50 am    Post subject: Reply with quote

Thanks greyhare, it works like this now. I have to agree with you, this was not handled very in the ebuild...
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7257
Location: almost Mile High in the USA

PostPosted: Sun Jun 08, 2014 6:13 pm    Post subject: Reply with quote

+1
I hacked my xml file to get past the build precheck phase, though I think the warning/error was too terse and difficult to know what needed to be done if you've been using libvirt. At least it didn't kill the VMs on next start, it was a good warning for things to come.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 282
Location: Castelo Branco, Portugal

PostPosted: Wed Jun 11, 2014 8:02 am    Post subject: Reply with quote

Thank you !

The ebuild message is not clear !
_________________
Do It With Rhythm
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5410

PostPosted: Wed Jul 30, 2014 5:46 pm    Post subject: Reply with quote

+1

thanks, why can't the make it more clearer?????
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum