[libvirt-users] caps->nguests == 0?

Eric Blake eblake at redhat.com
Tue Jun 19 22:30:48 UTC 2012


On 06/19/2012 03:20 AM, Zhihua Che wrote:

> First, I'm sorry I forgot to mention that I installed my
> qemu-system-x86_64 in a non-default path, that is, NOT in /usr/bin,
> /usr/local/bin etc.
> In this case, if I started up libvirtd with sudo, qemuCapsInitGuest
> failed to add hvm guest os type to driver->capabilities because it
> can't find qemu-system-x86_64 by searching environmental variable
> PATH!.
> 
> But, the most confusing thing happened here. I've added the
> qemu-system-x86_64 in PATH by editing the /etc/bash.bashrc. Why can't
> it still find the qemu?. I found in
> qemuCapsInitGuest->virFindFileInPath(info->binary) that the call to
> getenv("PATH") didn't return the path I added myself!

Remember, 'sudo' sanitizes PATH.  Just because you added the directory
to _your_ PATH, under your uid, does not mean that the sanitized PATH
used by sudo and user root is the same, unless you take explicit actions
to set PATH as part of your sudo environment setup.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120619/ad8fd5c2/attachment.sig>


More information about the libvirt-users mailing list