Change default (path) emulator for libvirt

asked 2015-07-07 19:53:03 -0600

GLaupre gravatar image

updated 2015-07-08 16:08:06 -0600


I downloaded the new version of qemu-kvm and I made some changes in the code. I compiled the new version and installed it. The path to the emulators are under /usr/local/bin.

With libvirt, nova uses the path /usr/libexec to find the emulators to be used. I want that nova uses the emulators under /usr/local/bin/

I am trying three different things without any success:

  • Changing the default emulator path in the libvirt

I actually don't find where I can change the default path. My $PATH has /usr/local/bin as first entry but it seems that libvirt doesn't look at the ENV variable $PATH.

  • Addind a 'emulator' parameter in the XML config file that will be use to spawn the new instance.

I have found that someone already did a small patch but not too much explanation are given. I don't understand where in '' I can add this option I am still looking at the code under nova/virt/libvirt. Also it seems that is no emulator is specified in the XML, the default path will be /usr/libexec/qemu-kvm

  • Adding the option emulator=/usr/local/bin under [libvirt] in nova.conf

But this change seems not to be taken into account

EDIT 1 From those 3 directions, I think trying to add the <emulator> parameter in the XML file seems to be the more reasonable but I have some dfficulties to find where to add that in the code under nova/virt/libvirt.

Can someone gives me some hints? Thanks a lot :)

edit retag flag offensive close merge delete


Can you set the $PATH in root user's profile and try?

uts9 gravatar imageuts9 ( 2015-07-08 02:08:32 -0600 )edit

My $PATH is already /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/stack/.local/bin:/home/stack/bin

What change do you want me to do?

GLaupre gravatar imageGLaupre ( 2015-07-08 13:45:44 -0600 )edit