Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-25 Thread Meng Xu
On Tue, May 24, 2016 at 11:16 AM, Dario Faggioli
 wrote:
> [trimmed To/Cc]
>
> On Fri, 2016-05-20 at 13:56 -0400, Meng Xu wrote:
>> On Fri, May 20, 2016 at 6:20 AM, Jan Beulich 
>> wrote:
>> > 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
>> > some
>> > 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.
>>
>> Once I have it set up successfully, I can write a xen wiki to
>> describe
>> how to do it.
>>
> Hey Meng,
>
> Now that you've got a couple of alternatives, feel free to go and write
> the wiki page! :-P

I have added a separate wiki page for this.
I finally took Olaf and Donglin's approach. So I just documented that
approach. :-)

Please feel free to modify that page. I'm thinking if I should put a
link to the new page?


Thanks and Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-25 Thread Meng Xu
Hi Wei,

On Wed, May 25, 2016 at 6:53 AM, Wei Liu  wrote:
> On Tue, May 24, 2016 at 04:47:38PM -0400, Meng Xu wrote:
>> Hi Olaf,
>>
>> Thank you very much for your suggestion!
>>
>> On Fri, May 20, 2016 at 4:52 AM, Olaf Hering  wrote:
>> > On Thu, May 19, Meng Xu wrote:
>> >
>> >> Does anyone try to install two version of Xen toolstack on the same 
>> >> machine?
>> >
>> > I do that. See the INSTALL file which has examples at the end:
>> >
>> > * To build a private copy of tools and xen:
>> > configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
>> > make
>> > sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
>> >
>>
>> I'm wondering if  BOOT_DIR=/ood/path/boot and EFI_DIR=/odd/path/efi is a 
>> must?
>> I'm using the grub2 to boot the kernel (so that I can remotely control
>> which grub entry I will get into).
>>
>> I put the xen image to /boot and the system can boot up. The xl
>> toolstack seems working well.
>>
>> However, the dom0's name is null.
>>
>> When I run /ood/path/etc/init.d/xencommons restart , it reports the
>> following message:
>>
>> Stopping xenconsoled
>> Stopping QEMU
>> WARNING: Not stopping xenstored, as it cannot be restarted.
>> Starting xenconsoled...
>> Starting QEMU as disk backend for dom0
>>
>> I guess there is something wrong with the xenstored's configuration?
>> Did you happen to experience this issue before?
>>
>>
>
> I think xenstored is running fine.
>
> If you're using systemd, there should be a service called xen-init-dom0
> that needs to be started. That small program does a bunch of things
> including setting the name for Dom0 in xenstore.

Yes, you are right! After running xen-init-dom0, everything works now.

BTW, I followed Olaf and Dongli's approach. I'm writing the wiki now...

-- 
Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-25 Thread Wei Liu
On Tue, May 24, 2016 at 04:47:38PM -0400, Meng Xu wrote:
> Hi Olaf,
> 
> Thank you very much for your suggestion!
> 
> On Fri, May 20, 2016 at 4:52 AM, Olaf Hering  wrote:
> > On Thu, May 19, Meng Xu wrote:
> >
> >> Does anyone try to install two version of Xen toolstack on the same 
> >> machine?
> >
> > I do that. See the INSTALL file which has examples at the end:
> >
> > * To build a private copy of tools and xen:
> > configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
> > make
> > sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
> >
> 
> I'm wondering if  BOOT_DIR=/ood/path/boot and EFI_DIR=/odd/path/efi is a must?
> I'm using the grub2 to boot the kernel (so that I can remotely control
> which grub entry I will get into).
> 
> I put the xen image to /boot and the system can boot up. The xl
> toolstack seems working well.
> 
> However, the dom0's name is null.
> 
> When I run /ood/path/etc/init.d/xencommons restart , it reports the
> following message:
> 
> Stopping xenconsoled
> Stopping QEMU
> WARNING: Not stopping xenstored, as it cannot be restarted.
> Starting xenconsoled...
> Starting QEMU as disk backend for dom0
> 
> I guess there is something wrong with the xenstored's configuration?
> Did you happen to experience this issue before?
> 
> 

I think xenstored is running fine.

If you're using systemd, there should be a service called xen-init-dom0
that needs to be started. That small program does a bunch of things
including setting the name for Dom0 in xenstore.

Wei.

> Thanks and Best Regards,
> 
> Meng
> ---
> Meng Xu
> PhD Student in Computer and Information Science
> University of Pennsylvania
> http://www.cis.upenn.edu/~mengxu/
> 
> ___
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-24 Thread Meng Xu
Hi Olaf,

Thank you very much for your suggestion!

On Fri, May 20, 2016 at 4:52 AM, Olaf Hering  wrote:
> On Thu, May 19, Meng Xu wrote:
>
>> Does anyone try to install two version of Xen toolstack on the same machine?
>
> I do that. See the INSTALL file which has examples at the end:
>
> * To build a private copy of tools and xen:
> configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
> make
> sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
>

I'm wondering if  BOOT_DIR=/ood/path/boot and EFI_DIR=/odd/path/efi is a must?
I'm using the grub2 to boot the kernel (so that I can remotely control
which grub entry I will get into).

I put the xen image to /boot and the system can boot up. The xl
toolstack seems working well.

However, the dom0's name is null.

When I run /ood/path/etc/init.d/xencommons restart , it reports the
following message:

Stopping xenconsoled
Stopping QEMU
WARNING: Not stopping xenstored, as it cannot be restarted.
Starting xenconsoled...
Starting QEMU as disk backend for dom0

I guess there is something wrong with the xenstored's configuration?
Did you happen to experience this issue before?


Thanks and Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-24 Thread Dario Faggioli
[trimmed To/Cc]

On Fri, 2016-05-20 at 13:56 -0400, Meng Xu wrote:
> On Fri, May 20, 2016 at 6:20 AM, Jan Beulich 
> wrote:
> > 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
> > some
> > 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.
> 
> Once I have it set up successfully, I can write a xen wiki to
> describe
> how to do it.
> 
Hey Meng,

Now that you've got a couple of alternatives, feel free to go and write
the wiki page! :-P

Thanks and Regards,
Dario
-- 
<> (Raistlin Majere)
-
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R Ltd., Cambridge (UK)



signature.asc
Description: This is a digitally signed message part
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-24 Thread Olaf Hering
On Tue, May 24, Dongli Zhang wrote:

> 7. export LD_LIBRARY_PATH=/soft/xen/lib

That is to be replaced by --enable-rpath.

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

This is to be replaced by pvgrub2.

Olaf

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-24 Thread Dongli Zhang
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=/soft/xen --sysconfdir=/soft/xen

5. make tools

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

7. export LD_LIBRARY_PATH=/soft/xen/lib

8. PATH=$PATH:/soft/xen/bin:/soft/xen/sbin

9. export PYTHONPATH=/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 some
> >> 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
>
>


-- 
Dongli Zhang (张东立)
finallyjustice.github.io
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-23 Thread 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 some
>> 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



xl
Description: Binary data
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-20 Thread Meng Xu
Hi Jan,

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 some
> 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.

Once I have it set up successfully, I can write a xen wiki to describe
how to do it.

Thank you again for your time and help!

Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-20 Thread Meng Xu
On Fri, May 20, 2016 at 4:52 AM, Olaf Hering  wrote:
> On Thu, May 19, Meng Xu wrote:
>
>> Does anyone try to install two version of Xen toolstack on the same machine?
>
> I do that. See the INSTALL file which has examples at the end:
>
> * To build a private copy of tools and xen:
> configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
> make
> sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
>
> Note that pygrub has no concept of "rpath". Use pvgrub2 instead.

Thank you so much, Olaf!
I will try it out. :-)

Best Regards,

Meng

-- 
Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-20 Thread Jan Beulich
>>> 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 some
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.

Jan


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


Re: [Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-20 Thread Olaf Hering
On Thu, May 19, Meng Xu wrote:

> Does anyone try to install two version of Xen toolstack on the same machine?

I do that. See the INSTALL file which has examples at the end:

* To build a private copy of tools and xen:
configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
make
sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi

Note that pygrub has no concept of "rpath". Use pvgrub2 instead.

Olaf

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


[Xen-devel] Question about the best practice to install two versions of Xen toolstack on the same machine

2016-05-19 Thread Meng Xu
Hi all,

I'm trying to install two versions of Xen, say Xen 4.6 and Xen
4.7-unstable, onto the same machine. I want them to exist at the same
time, instead of letting one override the other.

I'm thinking about this because sometimes I want to try out someone
else's code which uses an older or newer version. But I also want to
keep my current version of Xen toolstack so that I won't need to
reinstall everything again later.

If I just use the following command, the new installation of the
toolstack will override the old version's toolstack. obviously:
$./configure
$make dist
$sudo make install
(Right now, I just have to recompile my code after I tried out someone
else's code that has a different version. I can keep two version of
Xen kernel and configure it in the grub2 entries. But I have to
reinstall the toolstack.)

My quick question is:
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?

---
I had a look at the ./configure's help. There are several options,
each of which can specify a specific path to install.
However, I'm not that sure if I should configure every option to make it work.

For example, it has --prefix and --exec-prefix to change the PREFIX
from /usr/local to user defined path. However, there is also --bindir
and --sbindir; I assume I should change it, should I? In addition,
should I specify the --libexecdir for the program executables?

I found one very old link at [1], but I doubt if it's still working
since Xen changes the toolstack a lot since Xen 4.1
http://old-list-archives.xenproject.org/xen-users/2009-09/msg00263.html

Thanks and Best Regards,

Meng
---
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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