Jim,

Thanks so much for your help.  Much appreciated! 

I filed a bug report with Ubuntu: 

https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1180281

Hopefully other Ubuntu users who are experiencing the same issue will add comments/feedback to the bug report.

Best regards,
Gizmo Chicken


On Mon, May 20, 2013 at 9:46 AM, Jim Fehlig <jfehlig@suse.com> wrote:
Gizmo Chicken wrote:
> Hi Jim,
>
> Thanks much for suggestions.  And please accept my apologies for not
> replying sooner.  Your reply got buried in lots of other list-serve
> messages.
>
> You asked:   "Ensure xend is *not* running and then restart libvirtd.
>  The libvirt libxl driver will only load when xend is not running."
>
> I'm a bit new at this, but I was under the impression that setting
> setting toolstack=xl in /etc/default/xen would prevent xend from
> starting.  That is, I thought that xend wouldn't start when xl was
> running.  Am I totally wrong about that?
>
> In any case, xl is running and if I try to send an xm command, I get
> the following:  "A different toolstack (xl) has been selected!"  Is
> there something else that I should try to insure that xend isn't running?

According to that, xend is not running.

>
> (As a reminder, if I set toolstack=xm in /etc/default/xen,
> virt-manager works great.  But I'm hoping to use the xl toolstack.)
>
> You asked:  "Did the libxl driver even load?  There should be some
> evidence of that in libvirtd.log."
>
> My libvirtd.log doesn't seem provide any evidence of that the libxl
> driver is loaded.  (See log copied below.)  But libvirtd.log does
> mention an "internal error failed to connect with xend."  So honestly,
> I'm not quite sure whether libxl loaded. What's the best way to confirm?

The log snippet confirms xend is not running, but nothing about the
libxl driver.

>
> You asked:  "Has your libvirt package been built with the libxl driver
> enabled?"
>
> I'm using the libvirt package that is available from the Ubuntu 13.04
> (and now 13.10) repository.  How would I go about checking whether
> that package was built with the libxl driver enabled?

Not sure.  I use fedora and openSUSE.  I haven't used Ubuntu's virt
packages.  Sounds like you should file a bug with Ubuntu or ask on one
of their related mailing lists.

Regards,
Jim

>
> Thanks so much for any additional help you can provide!
>
> Best regards,
> GizmoChicken
>
>
> var/log/libvirt/libvirtd.log
>
> 2013-05-18 05:44:47.614+0000: 1304: info : libvirt version: 1.0.5
> 2013-05-18 05:44:47.614+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.615+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.617+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.618+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.618+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.619+0000: 1304: error : xenHypervisorDoV2Sys:1006
> : Unable to issue hypervisor ioctl 3166208: Permission denied
> 2013-05-18 05:44:47.635+0000: 1304: error : do_connect:103 : internal
> error failed to connect to xend
> 2013-05-18 05:44:47.636+0000: 1304: error : xenDaemonOpen_tcp:700 :
> unable to connect to 'localhost:8000': Connection refused
> 2013-05-18 05:45:13.647+0000: 1289: error : virNetSocketReadWire:1362
> : Cannot recv data: Connection reset by peer
>
>
>
>
>
>
>
> On Mon, Apr 1, 2013 at 9:21 AM, Jim Fehlig <jfehlig@suse.com
> <mailto:jfehlig@suse.com>> wrote:
>
>     Gizmo Chicken wrote:
>     > QUESTION:  What, if anything, can I do so that I can use xl (in
>     place
>     > of xm) with libvirt 1.0.2 and Xen 4.2.1 in Ubuntu 13.04?
>
>     Ensure xend is *not* running and then restart libvirtd.  The libvirt
>     libxl driver will only load when xend is not running.
>
>     >
>     > BACKGROUND:  I am testing a fully updated (as of March 27)
>     > installation of Ubuntu 13.04 that includes the following packages:
>     >
>     > libvirt - version 1.0.2-0ubuntu9
>     > xen-hypervisor-4.2-amd64 - version 4.2.1-0ubuntu1
>     >
>     > Upon setting TOOLSTACK=xm in /etc/default/xen (as well as making
>     a few
>     > needed tweaks to /etc/xen/xend-config.sxp), libvirt and virt-manager
>     > worked great.  Yippee!
>     >
>     > I guess that I should be happy that the xm toolstack still works
>     with
>     > Xen 4.2.1 and quit while I'm ahead, but...
>     >
>     > According to libvirt's documentation:
>     >
>     > "libxl: Starting with Xen 4.2, the legacy XenD/xm toolstack is
>     > deprecated in favor of libxl, also commonly called libxenlight.
>     > libvirt supports this new Xen toolstack via the libxl driver. If
>     XenD
>     > is enabled, the legacy xen driver consisting of the above mentioned
>     > channels will be used. If XenD is disabled, the libxl driver will be
>     > used."
>     >
>     > See http://libvirt.org/drvxen.html.
>     >
>     > In view of the above, I attempted to use xl in place xm by setting
>     > TOOLSTACK=xl in /etc/default/xen.   And after doing so (both
>     with and
>     > without, the above mentioned tweaks to /etc/xen/xend-config.sxp), I
>     > recieved the following error when attempting to start virt-manager:
>     >
>     > Unable to connect to libvirt.
>     >
>     > unable to connect to 'localhost:8000': Connection refused
>
>     Did the libxl driver even load?  There should be some evidence of that
>     in libvirtd.log.  Has your libvirt package been built with the libxl
>     driver enabled?
>
>     Regards,
>     Jim
>
>     >
>     > Verify that:
>     >  - A Xen host kernel was booted
>     >  - The Xen service has been started
>     >
>     > Libvirt URI is: xen:///
>     >
>     > Traceback (most recent call last):
>     >   File "/usr/share/virt-manager/virtManager/connection.py", line
>     1027,
>     > in _open_thread
>     >     self.vmm = self._try_open()
>     >   File "/usr/share/virt-manager/virtManager/connection.py", line
>     1009,
>     > in _try_open
>     >     flags)
>     >   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in
>     > openAuth
>     >     if ret is None:raise libvirtError('virConnectOpenAuth() failed')
>     > libvirtError: unable to connect to 'localhost:8000': Connection
>     refused
>     >
>     >
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > virt-tools-list mailing list
>     > virt-tools-list@redhat.com <mailto:virt-tools-list@redhat.com>
>     > https://www.redhat.com/mailman/listinfo/virt-tools-list
>
>