Re: caps->nguests == 0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux