1

When I try to connect to my XEN domain with virtmanager on Ubuntu 14.04 I just get the following error:

Unable to connect to libvirt.

internal error: libxenlight state driver is not active

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 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: internal error: libxenlight state driver is not active
2
  • Check if xend is running ps -ef | grep xend The error tells you to verify that: - A Xen host kernel was booted - The Xen service has been started If xend is not running try to start it using service xend start
    – cioby23
    Commented May 15, 2014 at 10:49
  • xend is not running, however a xen kernel was booted it. I'm assuming xend is not running the default toolstack has changed to xl in 14.04. See release notes wiki.ubuntu.com/TrustyTahr/ReleaseNotes#Ubuntu_Server
    – glisignoli
    Commented May 15, 2014 at 11:45

3 Answers 3

2

Mm. The same bug hit me and my own suggestion did not work. I already had the latest version.

Try this:

  1. Start Nautilus as root in terminal:

    sudo -H nautilus
    
  2. Find and copy the file /etc/xen/xend-config.sxp to /etc/xen/xend-config.sxp.backup:

    sudo cp /etc/xen/xend-config.sxp /etc/xen/xend-config.sxp.backup
    
  3. Open the file /etc/xen/xend-config.sxp with gedit or nano:

    sudo -H gedit /etc/xen/xend-config.sxp
    
  4. Find and uncomment the following lines:

    • xend-unix-server no, and change it to xend-unix-server yes
    • xend-unix-path /var/lib/xend/xend-socket, and change it to xend-unix-path /var/lib/xend/xend-socket
  5. Save the edited file and exit gedit or nano.

  6. Restart libvirt-bin, xen and xendomains services:

    sudo service libvirt-bin restart
    sudo service xen restart
    sudo service xendomains restart
    

I did the same and virt-manager connected.

The above instructions are largely based on a review by Gizmo Chicken on virt-manager on Ubuntu's Software Centre.

This issue shows up here:
http://lists.xen.org/archives/html/xen-devel/2012-12/msg01867.html

And is maybe related to the issue here:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/915954

-1

try updating virt-manager.

ubuntuupdates.org

2
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – Fern Moss
    Commented Aug 21, 2014 at 1:00
  • alright. virt-manager 0.9.5 does not seem to use libvirt properly being an earlier version. Ubuntuupdates.org keeps up with the latest builds of packages and where to find them. either search for virt-manager there (recommended) and follow the links there or go to getdeb.net/app/virt-manager and follow the prompts.
    – anon
    Commented Aug 21, 2014 at 1:44
-1

I had this error and discovered that it was because the Xen kernel was not selected at boot.

To prove this, catch the grub boot prompt and ensure that the Xen kernel is selected.

Assuming this now works, you need to check with your specific distro how to make this persistent. For Debian Jessie I used:

dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen

then

update-grub 
1
  • Welcome to AU and thank you for taking your time to help other users. Please add more detail to your answer.
    – userDepth
    Commented Jan 20, 2017 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .