<div dir="ltr"><div>Thanks Cole, unfortunately I'm a n00b in this area so your response just raised many more questions for me :/<br><br></div><div>* what are the config file names for libxl, libvirt and virt-manager<br>* where are they located in the respective source trees<br>* are the build flags defined in those config files?<br></div>* libxl is part of xen 4.5.0 distro (xen/tools/libxl after untarring). But no config file is in xen/tools/libxl directory<br><div><div>* I do see CFLAGS definitions in the various makefiles within each directory. Are those the build flags you are referring to? here's an example from libxl/Makefile:<br><div><br>CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \<br> -Wno-declaration-after-statement -Wformat-nonliteral<br>CFLAGS += -I. -fPIC<br><br></div><div>* by distro I assume you mean binary package, and that I can install virt-manager binary package on top of libxl/libvirt/xen that I built and installed locally from source. if I have compiled libxl/libvirt/xen with virt-manager compile flags. Does that summarize what you are recommending? If so then how do I know virt-manager flags? That was a binary. Do I have to download virt-manager source to find those?<br><br></div><div>* libxl was part of xen source tarball, and therefore has a source tree position within xen (xen/tools/libxl as mentioned before). Should I place libvirt and virt-manager in some specific source tree spot relative to xen? Should libvirt and virt-manager be aware of libxl source location? Is there any makefile engineering involved?<br><br></div><div>Trying to work with your answer but I have a serious background deficit to deal with. For this reason I love technical 'cookbooks' that provide all missing details :)<br><br></div><div>Thanks,<br></div><div>Wayne<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 12:12 PM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 03/02/2015 10:55 AM, Wayne Mills wrote:<br>
> Hi,<br>
><br>
> I built and installed Xen 4.5.0 from source, on top of Ubuntu 14.04.2, using<br>
> "make world" and "make install" targets. I then installed latest virt-manager<br>
> from pre-built packages. After bringing up virt-manager I attempt to connect<br>
> to Xen hypervisor and got:<br>
><br>
> unable to connect to libvirt<br>
> Failed to connect socket to /var/run/libvirt/libvirt-sock' No such file<br>
> or directory<br>
><br>
> I then noticed libvirt-bin isn't running. If I try to issue 'service<br>
> libvirt-bin start' it gives me back a process number, but it apparently dies<br>
> quickly because the service still shows as down. Three log files are touched<br>
> during my start attempt:<br>
><br>
> -rw-r--r-- 1 root root 39757 Feb 27 06:00 /var/log/xenstored-access.log<br>
> -rw-r--r-- 1 root root 44908 Feb 27 06:00<br>
> /var/log/libvirt/libxl/libxl-driver.log<br>
> -rw------- 1 root root 46396 Feb 27 06:00 /var/log/libvirt/libvirtd.log<br>
><br>
> * xenstored-access.log has 22 new entries, grouped into pairs that increment<br>
> an "Axx" identifier and go from A63 to A73. Here is the A63 logs:<br>
><br>
> [20150227T11:00:29.478Z] A63 newconn<br>
> [20150227T11:00:29.479Z] A63 endconn<br>
><br>
> * libxl-driver.log also has 11 log groupings that are just the same set of<br>
> logs repeated 11 times. Here is the first group:<br>
><br>
> xc: detail: sysctl operation failed -- need to rebuild the user-space<br>
> tool set?<br>
> libxl: error: libxl.c:4320:libxl_get_physinfo: getting physinfo:<br>
> Permission denied<br>
> xc: debug: hypercall buffer: total allocations:7 total releases:7<br>
> xc: debug: hypercall buffer: current allocations:0 maximum allocations:1<br>
> xc: debug: hypercall buffer: cache current size:1<br>
> xc: debug: hypercall buffer: cache hits:6 misses:1 toobig:0<br>
><br>
> * libvirtd.log also has 11 log groupings, that are just the same set of logs<br>
> repeated 11 times. Here is that group:<br>
><br>
> 2015-02-27 11:00:29.479+0000: 4842: info : libvirt version: 1.2.2<br>
> 2015-02-27 11:00:29.479+0000: 4842: error : libxlDriverConfigNew:1131 :<br>
> Unable to configure libxl's memory management parameters<br>
> 2015-02-27 11:00:29.479+0000: 4842: error : virStateInitialize:749 :<br>
> Initialization of LIBXL state driver failed: Unknown problem<br>
> 2015-02-27 11:00:29.479+0000: 4842: error : daemonRunStateInit:920 :<br>
> Driver state initialization failed<br>
><br>
> When I google for libxl_get_physinfo I see other reported errors during "xl<br>
> info" and other "xl" commands. I tried "xl info" and that works for me and<br>
> does not alter the log files:<br>
><br>
> root@<server>:~# xl info<br>
> host : server<br>
> release : 3.13.0-46-generic<br>
> version : #75-Ubuntu SMP Tue Feb 10 15:24:04 UTC 2015<br>
> machine : x86_64<br>
> nr_cpus : 8<br>
> max_cpu_id : 7<br>
> nr_nodes : 2<br>
> cores_per_socket : 4<br>
> threads_per_core : 1<br>
> cpu_mhz : 2400<br>
> hw_caps :<br>
> bfebfbff:2c100800:00000000:00003f00:17bee3ff:00000000:00000001:00000000<br>
> virt_caps : hvm hvm_directio<br>
> total_memory : 98168<br>
> free_memory : 128<br>
> sharing_freed_memory : 0<br>
> sharing_used_memory : 0<br>
> outstanding_claims : 0<br>
> free_cpus : 0<br>
> xen_major : 4<br>
> xen_minor : 5<br>
> xen_extra : .0<br>
> xen_version : 4.5.0<br>
> xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32<br>
> hvm-3.0-x86_32p hvm-3.0-x86_64<br>
> xen_scheduler : credit<br>
> xen_pagesize : 4096<br>
> platform_params : virt_start=0xffff800000000000<br>
> xen_changeset : Mon Jan 12 11:30:05 2015 -0500 git:a8ac229<br>
> xen_commandline : placeholder<br>
> cc_compiler : gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2<br>
> cc_compile_by : root<br>
</div></div>> cc_compile_domain : <a href="http://cisco.com" target="_blank">cisco.com</a> <<a href="http://cisco.com" target="_blank">http://cisco.com</a>><br>
<span class="">> cc_compile_date : Thu Feb 19 07:26:00 EST 2015<br>
> xend_config_format : 4<br>
> root@<server>:~#<br>
><br>
> After consulting with xen-users mailer, I was given this response by "Ian":<br>
><br>
> "Did you install libvirt from source or from packages? If the latter then you<br>
> may have a disconnect between the packaged version and your source-built Xen.<br>
> You'll probably need to rebuild libvirt against your Xen libraries."<br>
><br>
> What are the virt-related steps to take to test out Ian's idea? I have root<br>
> access to one machine that serves both as a host to VM's as well as a build<br>
> environment for source builds such as this. I already built xen 4.5.0 and<br>
> installed it. Do I now need to separately download and build libvirt, then<br>
> download and build virt-manager? Is it important to place the virt* code<br>
> within the xen source tree, or do something else so that the virt* code<br>
> compiles "against" an appropriate xen environment?<br>
><br>
> In summary, I would like some guidance on how to build libvirt, and if needed,<br>
> virt-manager, source against a specific Xen version.<br>
><br>
<br>
</span>Distro packages of virt-manager should work fine, once you get libvirt building.<br>
<br>
I recommend you download the ubuntu .deb config files for libxl, and<br>
rebuild+install libxl with the exact same build flags your distro packages<br>
use. They've already figured out the necessary flags to make things work<br>
together with the other distro packages. Then do the same with libvirt.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Cole<br>
</font></span></blockquote></div><br></div>