Xen Orchestra on Ubuntu 15.10 - Complete installation instructions



  • This guide assumes you already have a running Ubuntu 15.10 system on which you want to configure Xen Orchestra, everything else is documented below.

    TL;DR: Run this command as root on Ubuntu 15.10...

    sudo curl https://raw.githubusercontent.com/scottalanmiller/xenorchestra_installer/master/xo_install.sh | bash
    

    During the installation of your OS, you'll want to create a user outside of root, I made my user account xoadmin

    How to Install Xen Orchestra Source on Ubuntu 15.10 (self compiled) AKA MANUAL installation

    sudo apt-get install --yes nfs-common
    curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
    sudo apt-get install --yes nodejs
    curl -o /usr/local/bin/n https://raw.githubusercontent.com/visionmedia/n/master/bin/n
    chmod +x /usr/local/bin/n
    n stable
    node -v
    npm -v
    sudo apt-get install --yes build-essential redis-server libpng-dev git python-minimal
    git clone -b stable https://github.com/vatesfr/xo-server
    git clone -b stable https://github.com/vatesfr/xo-web
    cd xo-server
    sudo npm install && npm run build
    cp sample.config.yaml .xo-server.yaml
    nano .xo-server.yaml
    
    #Edit and uncomment it to have the right path to XO-Web, because XO-Server embeds an HTTP server (we assume that XO-Server and XO-Web are on the same directory). It's near the end of the file:
    #  mounts: '/': '../home/xoadmin/xo-web/dist/
    #  save and exit
    
    cd ~
    cd ../xo-web
    sudo npm i [email protected]
    sudo npm install
    sudo npm run build
    cd ../xo-server
    sudo npm start
    

    The scripted installation thanks to @scottalanmiller

    Github Repo

    Below is the preferred Installation method. It includes the systemctl xo-server.service written by @Danp

    sudo bash
    <password>
    sudo curl https://raw.githubusercontent.com/scottalanmiller/xenorchestra_installer/master/xo_install.sh | bash
    <password>
    

    In your favorite web-browser go to this VM's IP Address, login with the default user: [email protected] and "admin" for the password. Update your Login Details!!

    Add your Xen Server(s) and go to town.

    Automatically Start XO at Boot - See this Post by @Danp Also copied below.

    Create a file in /etc/systemd/system/xo-server.service and enter the below into it.

    # systemd service for XO-Server.
    
     [Unit]
     Description= XO Server
     After=network-online.target
    
     [Service]
     WorkingDirectory=/opt/xo-server/
     ExecStart=/usr/local/bin/node ./bin/xo-server
     Restart=always
     SyslogIdentifier=xo-server
    
     [Install]
     WantedBy=multi-user.target
    

    Save the file, and then run to enable the service at start up.

    sudo systemctl enable xo-server.service
    

    To monitor the service you can then run

    journalctl -u xo-server -f -n 50
    

    For everyone on the newer releases of the "stable build" at least as of April-8-2016 there appears to be a bug when attempting to mount an NFS share; to resolve this follow the short process below

    • Login to your XO web console
    • Go to Backup
    • Select Remote Stores
    • Add your NFS Share, it'll likely fail out(unless it's been fixed since this posting)
    • Back on your XO console go to /tmp/xo-server/mounts
    • Run "ls" to see what mount is listed on your server
    • Next run "mount -t nfs nfs-server-ip-address:/path/to-share remote-#"

    Replacing nfs-server-ip-address with the actual IP of the remote server and the remote-# with whatever is listed on your console.

    0_1460121122626_XenCenterMain_2016-04-08_09-10-39.png

    0_1460121105143_XenCenterMain_2016-04-08_09-11-13.png



  • I've updated the above guide as some things weren't working when I tested the How-To.

    sudo -s may be usable, but for simplicity of the guide I've removed it. sudo is required before each command for the purposes of this guide.

    Sorry folks.



  • Are we ALL kicking the tires on Xen Orchestra now?



  • I have my "production" server running a XO VM. I just need a USB flash drive to configure my backup host to run Xen (and subsequently a CentOS SMB file Server) as the backup target.

    Those should be in tomorrow so it should be a pretty good setup.

    And yeah, as soon as @olivier posted the sources, and the delta backup capabilities I was sold. Now to test it :-)



  • I've got it running in a container and it's been pretty nice. Haven't had any issues so far.



  • I went ahead and got a Debian ova made for anyone who wants the easy way out. http://mangolassi.it/topic/7371/xen-orchestra-v4-11-ova/7



  • I am trying to do this using Ubuntu 14.04.3 but I get Cannot GET / :(

    [email protected]:~/xo-server$ sudo npm start
    
    > [email protected] start /home/xo/xo-server
    > node bin/xo-server
    
      app-conf /home/xo/xo-server/config.json +0ms
      app-conf /home/xo/xo-server/.xo-server.yaml +3ms
      xo:main Configuration loaded. +13ms
      xo:main Web server listening on http://[::]:80 +9ms
      xo:perf blocked for 209ms +265ms

  • Service Provider

    Why such an old Ubuntu version? I'm surprised there are issues, but still, that's old.


  • Service Provider

    What Node.js version do you have installed?



  • @scottalanmiller Because it's the lastest LTS release. Isn't using LTS best practice?


  • Service Provider

    @anonymous said:

    @scottalanmiller Because it's the lastest LTS release. Isn't using LTS best practice?

    No, it's a bad practice. Using something with "long term support" is a good practice, but with Ubuntu it is just a naming thing for marketing purposes. Even Canonical themselves do not recognize it as an LTS. It's just letters that they slap on every fourth release to make it sound like an enterprise product like RHEL. It isn't. Ubuntu is a rolling release will full support only for the latest build. So sticking to LTS is just "not updating" in this case. One of the many reasons that Ubuntu isn't that good. It's not "bad", but it isn't up to par.

    Ubuntu is like Fedora, you always want to be on the latest unless there is a compatibility issue. You would never intentionally use an LTS release unless you are doing something like MongoDB which only releases for certain versions. And the answer there is not to use Ubuntu but to use CentOS which is kept up to date.

    If you want a true LTS, Ubuntu is not an option for you. RHEL and SLES are the only enterprise long term support options in the Linux world.


  • Service Provider

    So your idea of sticking to a long term supported product is sound, it just doesn't apply to Ubuntu where LTS doesn't actually mean it is getting long term support.



  • Does Long Term Support even matter though? Is that for a situation where you can't upgrade the OS because of some limitation of the software running on top of it?

    Assuming the software will run on the latest, isn't that really the only place to be, support and patch wise?


  • Service Provider

    @Dashrender said:

    Does Long Term Support even matter though? Is that for a situation where you can't upgrade the OS because of some limitation of the software running on top of it?

    Assuming the software will run on the latest, isn't that really the only place to be, support and patch wise?

    So that's an interesting thought and I lean the way that you are thinking. But you can't guarantee forward compatibility in all cases. So I'd say "it depends." For most things, especially desktops, web apps and non-critical systems, I would go for "rolling releases" like Fedora and OpenSuse Tumbleweed or Ubuntu "current release" to make sure that I was always completely up to date. This eliminates a lot of migration risk and deprecation risk down the road.

    But when running apps that needs serious stability, long term testing and vendor support, it is often best to choose CentOS or OpenSuse Leap with super long, very stable release cycles and hard core support so that you can be sure that everything is going to work.



  • So I am going to try again with the latest version of Ubuntu Server, or Debian.



  • or should I try CentOS 7? Everything else I run is on CentOS 7.....


  • Service Provider

    Since you are at the point of "trying", I would definitely do CentOS 7.



  • @scottalanmiller You are a bit of a CentOS fanboy, and you made me one too! =P



  • @scottalanmiller said:

    @Dashrender said:

    Does Long Term Support even matter though? Is that for a situation where you can't upgrade the OS because of some limitation of the software running on top of it?

    Assuming the software will run on the latest, isn't that really the only place to be, support and patch wise?

    So that's an interesting thought and I lean the way that you are thinking. But you can't guarantee forward compatibility in all cases. So I'd say "it depends." For most things, especially desktops, web apps and non-critical systems, I would go for "rolling releases" like Fedora and OpenSuse Tumbleweed or Ubuntu "current release" to make sure that I was always completely up to date. This eliminates a lot of migration risk and deprecation risk down the road.

    But when running apps that needs serious stability, long term testing and vendor support, it is often best to choose CentOS or OpenSuse Leap with super long, very stable release cycles and hard core support so that you can be sure that everything is going to work.

    So we basically said the same thing - I did put the assuming the software will run on the latest bit in there. Of course if the software won't run on the latest, you need to stay on the version you're at.



  • You have to uncommend mounts! =/



  • I must be missing something, because I am having issues with every distro I use.....



  • npm ERR! Linux 3.10.0-327.el7.x86_64
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
    npm ERR! node v5.4.0
    npm ERR! npm  v3.3.12
    npm ERR! code ELIFECYCLE
    npm ERR! [email protected] start: `node bin/xo-server`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script 'node bin/xo-server'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the xo-server package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node bin/xo-server
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls xo-server
    npm ERR! There is likely additional logging output above.

  • Service Provider

    Remember when I asked what node version you were installing? That looks like Node 5. I thought XO could only work with Node 4.


  • Service Provider

    @scottalanmiller said:

    What Node.js version do you have installed?

    There was the question ^^^^

    I never saw a response. We could have tracked this down sooner :) You can't just use the Node that comes with the distro. Use NVM and control the Node version.



  • @scottalanmiller said:

    @anonymous said:

    @scottalanmiller Because it's the lastest LTS release. Isn't using LTS best practice?

    No, it's a bad practice. Using something with "long term support" is a good practice, but with Ubuntu it is just a naming thing for marketing purposes. Even Canonical themselves do not recognize it as an LTS. It's just letters that they slap on every fourth release to make it sound like an enterprise product like RHEL. It isn't. Ubuntu is a rolling release will full support only for the latest build. So sticking to LTS is just "not updating" in this case. One of the many reasons that Ubuntu isn't that good. It's not "bad", but it isn't up to par.

    Ubuntu is like Fedora, you always want to be on the latest unless there is a compatibility issue. You would never intentionally use an LTS release unless you are doing something like MongoDB which only releases for certain versions. And the answer there is not to use Ubuntu but to use CentOS which is kept up to date.

    If you want a true LTS, Ubuntu is not an option for you. RHEL and SLES are the only enterprise long term support options in the Linux world.

    @scottalanmiller Why aren't ubuntu LTS releases trully considered as having long term support? I usually use Centos but I do have several Ubuntu LTS boxes and from their documentation they appear as having long term support.

    0_1452612753264_2016-01-12 09_30_26-Release end of life _ Ubuntu.png


  • Service Provider

    @Romo said:

    @scottalanmiller Why aren't ubuntu LTS releases trully considered as having long term support? I usually use Centos but I do have several Ubuntu LTS boxes and from their documentation they appear as having long term support.

    Because Long Term Support suggests that when things break, they fix them and provide support. But Canonical doesn't do that. If things really break they tell their LTS clients to upgrade to the latest non-LTS release to continue getting support. True LTS support never requires "going to the non-LTS release" to continue getting support. The label LTS and their "support marketing timelines" are just made up marketing.


  • Service Provider

    @Romo said:

    from their documentation they appear as having long term support.

    Thats where terms like "marketing" and "lying" come into it.




  • Service Provider

    @Romo said:

    0_1452612753264_2016-01-12 09_30_26-Release end of life _ Ubuntu.png

    I know shops that in 2011 were already being told by Canonical that to get support they had to leave 10.04 LTS because they would only try to fix things in the 11.04 or 11.10 releases. 10.04 has major stability bugs that were just ignored because the 11 series fixed them. The LTS theory is that fixes would be backported. But they are not. Canonical just uses LTS to fool customers, they do not mean it to mean that they will support the product.


  • Service Provider

    @anonymous said:

    @scottalanmiller Like this?

    Install Node Using the Node Version Manager

    https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server

    Exactly. I was just about to look for this.



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.