Mailing List Archive

Where best to start
Dear Xen Community,

I’m new to the field of virtualization so please excuse this request if
it is placed on the incorrect forum.

I am running Ubuntu 18.04 and following the instructions on...

https://help.ubuntu.com/community/Xen

and not getting anywhere fast. I found out that the above instructions
are out of date for Ubuntu 18.04, because the networking has been
implemented differently

https://askubuntu.com/questions/1171864/how-to-install-xen-project-on-ubuntu-server-18-04-3-lts

However, when I make this change my machine can no longer access the
internet.

I have searched on https://xen.markmail.org/ but not really found a
clear answer to my question:

Please can anyone let me know the best way to get Xen up and running on
Ubuntu? Should I try to put Ubuntu 16.04 on my m/c and then follow the
instructions given?

And for the best tutorial? I have seen that there is “The Definitive
Guide to the Xen Hypervisor” by David Chisnall (2008) and “Running Xen:
A Hands-on Guide to the Art of Virtualization” by Jenna Matthews et. Al
(2008) but will these help with installing and using the current version?

Thank you for any insights that anyone may have.

Martin...
Re: Where best to start [ In reply to ]
I'm not a Ubuntu user so can't help there but the first thing I would do
generically is check that the bridge is working:

brctl show

should yield something like this:

    bridge name bridge id               STP enabled     interfaces
    xenbr0          8000.4ccc6ad1847d       no enp2s0

As for a tutorial, I'd suggest at least having a look through the Xen
Begginers Guide:

https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide

It's dated (in particular, I wouldn't follow the advice there for
building a PV Debian guest), but it contains the essentials to get Xen
working generically.

Also, since your network stopped working, I'd go back and check that
your netplan configuration matches the one in the link you sent. The key
is that dhcp is not enabled on the ethernet card (eth0 or enps0 or
whatever), but rather on the bridge.

David

On 2020-06-01 3:06 a.m., Martin Hargreaves wrote:
>
> Dear Xen Community,
>
> I’m new to the field of virtualization so please excuse this request
> if it is placed on the incorrect forum.
>
> I am running Ubuntu 18.04 and following the instructions on...
>
> https://help.ubuntu.com/community/Xen
>
> and not getting anywhere fast. I found out that the above instructions
> are out of date for Ubuntu 18.04, because the networking has been
> implemented differently
>
> https://askubuntu.com/questions/1171864/how-to-install-xen-project-on-ubuntu-server-18-04-3-lts
>
>
> However, when I make this change my machine can no longer access the
> internet.
>
> I have searched on https://xen.markmail.org/ but not really found a
> clear answer to my question:
>
> Please can anyone let me know the best way to get Xen up and running
> on Ubuntu? Should I try to put Ubuntu 16.04 on my m/c and then follow
> the instructions given?
>
> And for the best tutorial? I have seen that there is “The Definitive
> Guide to the Xen Hypervisor” by David Chisnall (2008) and “Running
> Xen: A Hands-on Guide to the Art of Virtualization” by Jenna Matthews
> et. Al (2008) but will these help with installing and using the
> current version?
>
>   Thank you for any insights that anyone may have.
>
>     Martin...
>
Re: Where best to start [ In reply to ]
Thank you very much for this input, Dave. It has allowed me to progress
to the next step.

By using 'ifconfig' and after re-booting my m/c a few times to make sure
that I could still access the internet, the command you showed me
produced...

brctl show
bridge name bridge id STP enabled interfaces
docker0 8000.0242296ec6a6 no
xenbr0 8000.861cdc1ac12c no enp0s25

I only issued the command that you gave me, so presumably the bridge was
created by the config.yaml file on boot-up?

I don't know where 'docker0' appeared from but hopefully this will not
interfere with the progress of the installation of a HVM.

Thank you again,
Martin...


On 01/06/2020 22:36, Dave Hill wrote:
> I'm not a Ubuntu user so can't help there but the first thing I would do
> generically is check that the bridge is working:
>
> brctl show
>
> should yield something like this:
>
>     bridge name bridge id               STP enabled     interfaces
>     xenbr0          8000.4ccc6ad1847d       no enp2s0
>
> As for a tutorial, I'd suggest at least having a look through the Xen
> Begginers Guide:
>
> https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide
>
> It's dated (in particular, I wouldn't follow the advice there for
> building a PV Debian guest), but it contains the essentials to get Xen
> working generically.
>
> Also, since your network stopped working, I'd go back and check that
> your netplan configuration matches the one in the link you sent. The key
> is that dhcp is not enabled on the ethernet card (eth0 or enps0 or
> whatever), but rather on the bridge.
>
> David
>
> On 2020-06-01 3:06 a.m., Martin Hargreaves wrote:
>>
>> Dear Xen Community,
>>
>> I’m new to the field of virtualization so please excuse this request
>> if it is placed on the incorrect forum.
>>
>> I am running Ubuntu 18.04 and following the instructions on...
>>
>> https://help.ubuntu.com/community/Xen
>>
>> and not getting anywhere fast. I found out that the above instructions
>> are out of date for Ubuntu 18.04, because the networking has been
>> implemented differently
>>
>> https://askubuntu.com/questions/1171864/how-to-install-xen-project-on-ubuntu-server-18-04-3-lts
>>
>>
>> However, when I make this change my machine can no longer access the
>> internet.
>>
>> I have searched on https://xen.markmail.org/ but not really found a
>> clear answer to my question:
>>
>> Please can anyone let me know the best way to get Xen up and running
>> on Ubuntu? Should I try to put Ubuntu 16.04 on my m/c and then follow
>> the instructions given?
>>
>> And for the best tutorial? I have seen that there is “The Definitive
>> Guide to the Xen Hypervisor” by David Chisnall (2008) and “Running
>> Xen: A Hands-on Guide to the Art of Virtualization” by Jenna Matthews
>> et. Al (2008) but will these help with installing and using the
>> current version?
>>
>>   Thank you for any insights that anyone may have.
>>
>>     Martin...
>>
Re: Where best to start [ In reply to ]
Hi Dave,

> It's dated (in particular, I wouldn't follow the advice there for building a PV Debian guest), but it contains the essentials to get Xen working generically.
>
how are you building your Xen guests?


Regards
Volker
Re: Where best to start [ In reply to ]
Hi Volker,

It's been a bit of a journey.  Lately I've been using pvhvm for my domUs.

The Guide is not wrong in any way. It's actually a bit of self-criticism
to say it's dated, since I tried to update it not too long ago. I didn't
edit this section mostly because it does work and I wasn't sure of
current best practices.

Having said that, here are some of the concerns I have about it:

It uses pygrub. The script is super convenient but it's also opaque. The
user can install Debian or Ubuntu or, at least according to apt show,
older versions of CentOS. It is the most efficient approach for a
beginner to get a PVM up and running. It means though that beginners
don't acquire generic knowledge about installing distributions and
writing/editing their own domU cfg files.

The Guide also says that pv-grub is not included in Debian, which is no
longer the case and hasn't been for some time. I found the comments in
the PvGrub2 page (https://wiki.xen.org/wiki/PvGrub2) about pygrub
persuasive after I ran into one such a limitation.

Using pv-grub2 (or pvgrub2), is also a bit complicated though. The Guide
refers the reader to a manual installation of Alpine Xen. The Alpine
installation is a bit hard-core although it can be made to work. I also
don't fully understand its boot process. Alpine's alpine.cfg file
appears to rely on pv-grub2's former tolerance of GRUB1 menu.lst which I
don't think works any longer.  I found myself dumped out to a GRUB
prompt when I tried n fresh installation today. I previously learned to
deal with that but it's not fun.

So, for a while I used pygrub, then I switched to pv-grub2. Then the PV
drivers were added to the Linux kernel. The rationale for creating pv
Linux guests was less clear. The Xen Project Best Practices page
(https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices) seems to
recommend PVHVM.  So I switched my domU config files to:
    type=hvm
    xen_platform_pci=1

which I think accomplishes that. Installation of a domU is now almost
identical to installing a distribution on hardware.

As may be apparent by this point, I consider myself to be a sort of
permanent beginner at using Xen which is why I felt qualified to edit
the Guide.

I'd really appreciate any comments you might have about any of this
because I am just a beginner and may have it all or partially wrong.

In closing, let me say how fantastic I think Xen and its developers are!
It's amazing to have such easy access to such a sophisticated system.

Dave

On 2020-06-02 7:11 a.m., Volker Janzen wrote:
> Hi Dave,
>
>> It's dated (in particular, I wouldn't follow the advice there for
>> building a PV Debian guest), but it contains the essentials to get
>> Xen working generically.
>>
> how are you building your Xen guests?
>
>
> Regards
>      Volker
>