Issue

xcp-xapi on ubuntu 14.04

posted in XAPI
Wednesday, July 16 2014, 06:49 AM
0
Hi all,
I have already since some time Citrix XenServer (where I understand it is somehow CentOS based) managed via XenCenter (on Windows).

I have now tried to setup the same on Ubuntu.

Although very much confusing for me, my understanding was, I would need to install the XCP-XAPI Tool-Stack on Ubuntu and that would bring the same functionality.

When installing xcp-xapi package, it last but not least installs on 14.04 the "xen-system-amd64" meta-package. I then can install the xcp-xe on top, which should enable the xe-command.

Anyhow.

It looks like, the dom0 is availabel on that system.

Question: How can I get this system to be managed via Citrix XenCenter ?
I have not fund a way so far.

Regards
Karl-Heinz
Responses (17)
  • Accepted Answer

    Wednesday, July 16 2014, 12:57 PM - #permalink
    0
    I'm not a XenServer guy, but I did find this post which appears related:

    http://ubuntuforums.org/showthread.php?t=2158441

    This user has a similar problem and writes:

    -----
    I've managed to de-garble the line in the /etc/pam.d/xapi file. If you change the file to look like this, you should be able to log in with XenCenter:

    #%PAM-1.0
    auth include common-auth
    account include common-auth
    password include common-auth

    Hope that helps someone who comes across a similar issue in future.
    -----

    Let us know if that works. If not, we'll see if we can find a XenServer person to help out.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 01:58 PM - #permalink
    0
    Hi Russ,
    looks like an interesting info.

    Configuration on my 14.04. is slightly different.

    File: /etc/pam.d/xapi.dpkg-new (why ever)

    Content:
    #%PAM-1.0
    
    auth sufficient pam_succeed_if.so user ingroup root
    #auth sufficient pam_succeed_if.so user ingroup xapi


    I would assume, this should allow access with the user root and check password via pam for root.

    Now, on Ubuntu Systems normally root does not have a password and you use sudo to work with.

    The line is commente out, but anyhow there is no user xapi.

    Is there anyone to tell me how to configure this xcp-xapi correctly ?

    Thanks
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 02:41 PM - #permalink
    0
    If the file has the extension .dpkg-new, I don't believe it is being used.

    Try renaming or copying the file to /etc/pam.d/xapi and reboot. See if that helps.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 02:52 PM - #permalink
    0
    Hi Russ,
    I will try.

    But what does this line say:

    auth sufficient pam_succeed_if.so user ingroup root


    Does the user I will login with XenCenter have to be member of the group "root"?

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 03:03 PM - #permalink
    0
    >Does the user I will login with XenCenter have to be member of the group "root"?

    I'm not a PAM expert, but it is possible.

    I've been Googling and found a patch from 2012 which modified the xapi PAM file similarly to what you see. It includes the comment:

    +#Uncomment to allow group 'xapi' to authenticate. You must create this group manually!
    +#auth sufficient pam_succeed_if.so user ingroup xapi

    So it looks like you could manually create a "xapi" group and uncomment that line if you wanted to. I am still looking for other possible solutions.

    I haven't used xcp-xapi myself, so I'm afraid I haven't had to configure it before.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 03:18 PM - #permalink
    0
    Hi Russ,
    I have tried with renamed file and rebooted.

    On the other hand, by my knowledge, pam takes all files in pam.d as they are since there is no extension like ".conf" or so!

    I have added a user who has a password (root does not have one) to the root-group and have tried to login with this user on XenCenter - no success.

    If you have some idea I would appreciate it.

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 03:29 PM - #permalink
    0
    I am trying to get someone with XenServer experience to look into this. I know very little about what XenCenter requires to talk to an xcp-xapi node.

    I am also doing research on my own in case I can find something.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 03:56 PM - #permalink
    0
    Okay, I've found a bit of background:

    Originally, the PAM parameters were oriented toward using XenCenter in XenServer or XCP. As XAPI became more independent, the parameters were changed to be more restrictive in the interest of safety.

    It appears the intended solution is to create a xapi group, enable the commented out line in the PAM file, and try to access the node using the xapi group.

    Here are some of the historical links. They also include a number of commands to try using the xe syntax, which could yield more useful error messages:

    http://lists.xen.org/archives/html/xen-api/2012-08/msg00021.html
    http://lists.xen.org/archives/html/xen-api/2012-08/msg00022.html
    https://7terminals.com/articles/fix-login-failure-from-xencenter-to-xcp-xapi-running-on-ubuntu-12-04/

    I suggest trying the xapi group route while I continue to research.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 04:00 PM - #permalink
    0
    Hi Russ,
    thanks for your efforts. I appreciate it very much.

    On my knowledge, I cannot login on a group.

    So I assume you mean to create this group, change the pam.d-file accordingly since this entry is commented out and assign a user which has a password to this group and try the login on XenCenter with this user.

    Thats how I could think of the whole chain.

    Will try.

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 04:16 PM - #permalink
    0
    Hi Russ,

    mmmmh - no!

    I have created a group and assigned a user with a password to this group.

    I have uncommented the line in the pam.d-file and commented out the line with root.

    I have tried to login from XenCenter (on windows) with this user - no success. Error message does not say very much.

    xe-command brings an error.

    Server internal error.


    xl-command works. But this is not what I would like to have.

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 05:02 PM - #permalink
    0
    If xl works and xe doesn't, it sounds like something more basic is misconfigured.

    What is the TOOLSTACK value in /etc/default/xen? Should be TOOLSTACK="xapi", I believe.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 17 2014, 05:10 AM - #permalink
    0
    Hi Russ,
    did not help. Same error on xe after reboot.

    Where can I find more details on the settings of xcp-xapi on ubuntu?

    If there is a description what all these settings are for I probably could check in more detail myself.

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 17 2014, 01:56 PM - #permalink
    0
    Karl-Heinz,

    The standard doc page for xcp-xapi can be found here:

    http://wiki.xenproject.org/wiki/XAPI_toolstack_on_a_Debian-based_distribution

    Even though XAPI is part of Xen Project, the kits in Debian/Ubuntu came from the XenServer engineering team at Citrix. As such, most of the Xen Project folks only have limited knowledge and experience in using them.

    Since the xcp-xapi kit came out of the XenServer/XCP effort, the best place to debug this further is probably through the XenServer support resources. If you go to XenServer.org, there is a list of support forums and lists available. The best I can do at the moment is to suggest you give them a try.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 18 2014, 05:19 AM - #permalink
    0
    Hi Russ,
    thanks for your detailled info.

    Will give it a try.

    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Ange Mucyo
    Ange Mucyo
    Offline
    Wednesday, July 23 2014, 02:32 PM - #permalink
    0
    And just my two cents, maybe this tutorial on getting xen and xcp-xapi up and running on ubuntu might be of some help.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 27 2014, 08:42 AM - #permalink
    0
    Hi Ange,
    since the package xcp-xapi ist outdated in 14.04, it does not work.

    I have setup the server from scratch and used the standard packages from ubuntu available for xen.

    In general, they seem to work. Anyhow, the "xe"-command is not available.

    Thanks for give it a try
    Regards
    Karl-Heinz
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 27 2014, 07:48 PM - #permalink
    0
    Karl-Heinz,

    Work has been underway to properly separate the XAPI layer from XenServer/XCP. Prior to the Xen Project joining the Linux Foundation last year, XAPI was usually packaged with XenServer/XCP.

    Last I heard, a new release of XAPI separate from XenServer was underway. I don't know the status of the effort currently, but I believe a release was intended soon.

    I suggest asking in the xen-api mailing list. The people doing the work should be hanging out in there and might be able to tell you if there is code you could build in your environment.

    Information about accessing the mailing list can be found here:

    http://xenproject.org/help/mailing-list.html

    Russ
    The reply is currently minimized Show
Your Reply