From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dongli Zhang Subject: Re: Question about the best practice to install two versions of Xen toolstack on the same machine Date: Tue, 24 May 2016 16:12:48 +0800 Message-ID: References: <573F011902000078000ED2F2@prv-mh.provo.novell.com> <5742C72B02000078000EDA1B@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6977852581931051338==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b57SO-0005qH-Bg for xen-devel@lists.xenproject.org; Tue, 24 May 2016 08:12:52 +0000 Received: by mail-oi0-f47.google.com with SMTP id k23so14729558oih.0 for ; Tue, 24 May 2016 01:12:49 -0700 (PDT) In-Reply-To: <5742C72B02000078000EDA1B@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Meng Xu , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org --===============6977852581931051338== Content-Type: multipart/alternative; boundary=001a11c14d0866cea50533921fd6 --001a11c14d0866cea50533921fd6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Meng, I never install two xen (actually xen-tools) on the same server. However, I always hate to install xen-tools at default locations since that will mess the OS. Here is how I install xen-tools without overriding the privileged folders like /etc or /usr. Hope this can help. ENV: xen-4.6.1 and Ubuntu 14.04.3. You can easily install xen.gz by just modifying grub. Let's skip this. About xen-tools, e.g., my username is "zhang" and I want to install tools at /soft/xen. I always run the following with a script. 1. sudo mkdir /soft/xen & sudo chown zhang /soft/xen 2. sudo mkdir /var/lib/xen & sudo chown zhang /var/lib/xen 3. sudo mkdir /var/lib/xenstored & sudo chown zhang /var/lib/xenstored 4. ./configure --prefix=3D/soft/xen --sysconfdir=3D/soft/xen 5. make tools 6. make install-tools (do not use "sudo" or "su" in this step) 7. export LD_LIBRARY_PATH=3D/soft/xen/lib 8. PATH=3D$PATH:/soft/xen/bin:/soft/xen/sbin 9. export PYTHONPATH=3D/soft/xen/lib/python2.7/site-packages (this is for pygrub) 10. Goto /soft/xen and run "./init.d/xencommons" 11. Boot guest with xl for either pv, pvhvm or hvm, never tried pvh :) Hopefully, you can install different xen-tools at different locations and let them share the same /var/lib/xen and /var/lib/xenstored. 2016-05-23 15:02 GMT+08:00 Jan Beulich : > >>> On 20.05.16 at 19:56, wrote: > > On Fri, May 20, 2016 at 6:20 AM, Jan Beulich wrote: > >>>>> On 19.05.16 at 20:40, wrote: > >>> Does anyone try to install two version of Xen toolstack on the same > machine? > >>> Is there any documentation about the best practice to install two > >>> versions of Xen onto the same machine? > >> > >> Or, as an alternative to Olaf's reply, don't install the tools at all, > but > >> instead run everything right out of the build trees. That requires som= e > >> script wrappers to get things like the library search path set up > >> correctly, but with that in place it has been working fine for me for > >> years. > >> > > > > Thank you so much for your suggestions! I tried to add the library > > and bins in xen/dist/install into the PATH and LD_LIBRARY_PATH, but > > failed to have the system work properly. > > > > I'm wondering if it's convenient for you, would you mind sharing your > > script wrapper? I can learn from it and customize it for my machine. > > Sure, here you go. For commands other then "xl" it ought to be > hard linked to respective other names. I cannot easily tell whether > it makes assumptions on settings done elsewhere in my systems, > so don't put too high hopes into being able to use it as is. > > Jan > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > > --=20 Dongli Zhang (=E5=BC=A0=E4=B8=9C=E7=AB=8B) finallyjustice.github.io --001a11c14d0866cea50533921fd6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Meng,

I never install two xen (actually xen= -tools) on the same server. However, I
always hate to install xen-tools = at default locations since that will mess the
OS. Here is how I install = xen-tools without overriding the privileged folders
like /etc or /usr. H= ope this can help.

ENV: xen-4.6.1 and Ubuntu 14.04.3.

You ca= n easily install xen.gz by just modifying grub. Let's skip this.
About xen-tools,

e.g., my username is "zhang" and I want = to install tools at /soft/xen. I always
run the following with a script.=

1. sudo mkdir /soft/xen & sudo chown zhang /soft/xen

2. = sudo mkdir /var/lib/xen & sudo chown zhang /var/lib/xen

3. sudo = mkdir /var/lib/xenstored & sudo chown zhang /var/lib/xenstored

4= . ./configure --prefix=3D/soft/xen --sysconfdir=3D/soft/xen

5. make = tools

6. make install-tools (do not use "sudo" or "su= " in this step)

7. export LD_LIBRARY_PATH=3D/soft/xen/lib
8. PATH=3D$PATH:/soft/xen/bin:/soft/xen/sbin

9. export PYTHONPATH= =3D/soft/xen/lib/python2.7/site-packages (this is for pygrub)

10. Go= to /soft/xen and run "./init.d/xencommons"

11. Boot guest = with xl for either pv, pvhvm or hvm, never tried pvh :)

Hopefully, y= ou can install different xen-tools at different locations and let
them s= hare the same /var/lib/xen and /var/lib/xenstored.

2016-05-23 15:02 GMT+08:00 Jan Beulich= <JBeulich@suse.com>:
>>> On 20.05.16 at 19:56, <mengxu@cis.upenn.edu> wrote:
> On Fri, May 20, 2016 at 6:20 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>> On 19.05.16 at 20:40, <mengxu@cis.upenn.edu> wrote:
>>> Does anyone try to install two version of Xen toolstack on the= same machine?
>>> Is there any documentation about the best practice to install = two
>>> versions of Xen onto the same machine?
>>
>> Or, as an alternative to Olaf's reply, don't install the t= ools at all, but
>> instead run everything right out of the build trees. That requires= some
>> script wrappers to get things like the library search path set up<= br> >> correctly, but with that in place it has been working fine for me = for
>> years.
>>
>
> Thank you so much for your suggestions!=C2=A0 I tried to add the libra= ry
> and bins in xen/dist/install into the PATH and LD_LIBRARY_PATH, but > failed to have the system work properly.
>
> I'm wondering if it's convenient for you, would you mind shari= ng your
> script wrapper? I can learn from it and customize it for my machine.
Sure, here you go. For commands other then "xl" it ought t= o be
hard linked to respective other names. I cannot easily tell whether
it makes assumptions on settings done elsewhere in my systems,
so don't put too high hopes into being able to use it as is.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel




--
Dongli Zhang (=E5=BC=A0=E4=B8=9C=E7=AB=8B) finallyjustice.github.io
--001a11c14d0866cea50533921fd6-- --===============6977852581931051338== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============6977852581931051338==--