Mailing List Archive

xen tutorials?
Hello All,
I have been working with Linux since 1999. I am now trying to use
virtualization useing Xen. I have a project where I have a Dell 2950
server with two ethernet ports, and one 1TB drive. I have 64 bit Debian
Squeeze installed and running. I need two instances of vm's one being
devel and the other is prod. each should connect through one of the eth
ports. so devel could be eth0 and prod could be on eth1.

I do have kernel vmlinuz-2.6.32-5-xen-amd64 running.

I have had so many issues trying to just get one vm running. make a cfg
file i get errors about installation files or hotplug issues. currently
my disk structure is
fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 37 297171 83 Linux
/dev/sda2 38 6117 48837600 83 Linux
/dev/sda3 6118 6604 3911827+ 82 Linux swap / Solaris
/dev/sda4 6605 115416 874032390 5 Extended
/dev/sda5 6605 60098 429690523+ 83 Linux
/dev/sda6 60099 60706 4883728+ 82 Linux swap / Solaris
/dev/sda7 60707 114808 434574283+ 83 Linux
/dev/sda8 114809 115416 4883728+ 82 Linux swap / Solaris
sda1 is the boot
sda2 is swap for the base debian install and ada3 is swap for that
sda5 is for devel and sda6 is a swap for that
sda7 is for prod and sda8 is swap for that

My main question is if nthere is a tutorial that can help me with getting xen installed and configured correctly, configure a guest, install a guest, and boot the guest using the above configuration?

--
Bill Beauchemin
B2 Bass Adventures
Newark, Ca. 94560
(510) 552-7571


_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
Hello Bill,

I don't know about an all-inclusive guide, but I recommend starting with
Xen Man Pages and the Xen Wiki. The raw text files provide plenty of
configuration details, and you should be able to search for tutorials:
http://wiki.xen.org/wiki/Xen_Man_Pages

With regards to your objectives, networking should be handled by Dom0 via
the bridge-utils package and /etc/network/interfaces configuration. Also
you may want to simplify your drive partitions since Xen virtual machines
will treat the partitions as drives, which results in a new partition table
and sub-partitioning each.


Here is a very basic example of the interfaces file you might want:

auto lo dev prod
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface prod inet manual
bridge_ports eth0
iface dev inet manual
bridge_ports eth1

Then you add a line like this to each virtual machine:
vif=['bridge=dev,model=e1000']

There is a lot of drive specifics you will want to read up on from the man
pages, and specific configuration details for linux/unix virtual machines.

If you continue to encounter errors, share them and your Xen version.


I am working on a Debian Wheezy x64 platform with Xen 4.2 a Windows,
PFSense, and Debian Wheezy HVM's, so my configuration objectives and syntax
may not be exactly what you need, but if you want an example:
http://pastebin.com/9E1g1BHf

Best of luck, and let me know if any of that was unclear.

~Casey


On Mon, Jun 4, 2012 at 11:35 PM, Bill Beauchemin
<bill@b2bassadventures.com>wrote:

> Hello All,
> I have been working with Linux since 1999. I am now trying to use
> virtualization useing Xen. I have a project where I have a Dell 2950 server
> with two ethernet ports, and one 1TB drive. I have 64 bit Debian Squeeze
> installed and running. I need two instances of vm's one being devel and
> the other is prod. each should connect through one of the eth ports. so
> devel could be eth0 and prod could be on eth1.
>
> I do have kernel vmlinuz-2.6.32-5-xen-amd64 running.
>
> I have had so many issues trying to just get one vm running. make a cfg
> file i get errors about installation files or hotplug issues. currently my
> disk structure is
> fdisk -l
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 37 297171 83 Linux
> /dev/sda2 38 6117 48837600 83 Linux
> /dev/sda3 6118 6604 3911827+ 82 Linux swap /
> Solaris
> /dev/sda4 6605 115416 874032390 5 Extended
> /dev/sda5 6605 60098 429690523+ 83 Linux
> /dev/sda6 60099 60706 4883728+ 82 Linux swap /
> Solaris
> /dev/sda7 60707 114808 434574283+ 83 Linux
> /dev/sda8 114809 115416 4883728+ 82 Linux swap /
> Solaris
> sda1 is the boot
> sda2 is swap for the base debian install and ada3 is swap for that
> sda5 is for devel and sda6 is a swap for that
> sda7 is for prod and sda8 is swap for that
>
> My main question is if nthere is a tutorial that can help me with getting
> xen installed and configured correctly, configure a guest, install a guest,
> and boot the guest using the above configuration?
>
> --
> Bill Beauchemin
> B2 Bass Adventures
> Newark, Ca. 94560
> (510) 552-7571
>
>
> ______________________________**_________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users
>
Re: xen tutorials? [ In reply to ]
On Tue, Jun 5, 2012 at 10:35 AM, Bill Beauchemin
<bill@b2bassadventures.com> wrote:
> Hello All,
> I have been working with Linux since 1999. I am now trying to use
> virtualization useing Xen. I have a project where I have a Dell 2950 server
> with two ethernet ports, and one 1TB drive.  I have 64 bit Debian Squeeze
> installed and running.  I need two instances  of vm's one being devel and
> the other is prod. each should connect through one of the eth ports. so
> devel could be eth0 and prod could be on eth1.
>
> I do have kernel vmlinuz-2.6.32-5-xen-amd64 running.

IIRC debian squeeze is not really the best platform to run xen for
beginners. If you're new to xen, I suggest the archaic-but-just-works
RHEL/Centos5.x.

Or even DON'T use xen, use whatever you're familiar with (e.g. kvm,
vmware, whatever).

And depending on what you run on it, using lxc on ubuntu precise might
actually be a better choice as it is VERY efficient, supported by the
distro, and it looks like:
- you'd be using linux guests anyway
- you'd have full control on all the guests

> I have had so many issues trying to just get one vm running. make a cfg file
> i get errors about installation files or hotplug issues.

Exactly :)

> currently my disk
> structure is
> fdisk -l
>  Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1          37      297171   83  Linux
> /dev/sda2              38        6117    48837600   83  Linux
> /dev/sda3            6118        6604     3911827+  82  Linux swap / Solaris
> /dev/sda4            6605      115416   874032390    5  Extended
> /dev/sda5            6605       60098   429690523+  83  Linux
> /dev/sda6           60099       60706     4883728+  82  Linux swap / Solaris
> /dev/sda7           60707      114808   434574283+  83  Linux
> /dev/sda8          114809      115416     4883728+  82  Linux swap / Solaris
> sda1 is the boot
> sda2 is swap for the base debian install and ada3 is swap for that
> sda5 is for devel and sda6 is a swap for that
> sda7 is for prod and sda8 is swap for that
>

FWIW, you didn't have to split it with partition (which will be hard
to modify later). Using LVM would probably be a better choice.


> My main question is if nthere is a tutorial that can help me with getting
> xen installed and configured correctly, configure a guest, install a guest,
> and boot the guest using the above configuration?

As Casey mentioned, the wiki is a good place to start. IIRC there
isn't a specific tutorial for squeeze though, so if you DO get it
working, please update the documentation there :)

--
Fajar

_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
Hello.

El 04/06/12 22:35, Bill Beauchemin escribió:
> I have a project where I have a Dell 2950
> server with two ethernet ports, and one 1TB drive. I have 64 bit Debian
> Squeeze installed and running. I need two instances of vm's one being
> devel and the other is prod. each should connect through one of the eth
> ports. so devel could be eth0 and prod could be on eth1.
Pretty similar to the setup I use all the time on my own. "Just works",
once you get around some issues, particularly the network setup.

1. Do not dedicate physical partitions to each VMs. It's too unflexible,
almost nobody uses it so (unless they really know what they are doing),
you will not find much references about issues specific to that setup.
The most simple way is to store VM's disks as files. A better one, but
little bit more complex, to use LVM volumes. If you are already familiar
with LVM you probably want to go straight for LVM.

2. Set up your network manually, not via xend's network scripts. Do not
attempt to export raw ethX to your VM's. Instead, set up a ethernet
bridge on each ethX you wish to use, which is a regular way. Then, in
the config file of each VM, you may specify to which bridge it should be
plugged.
http://wiki.xen.org/wiki/XenNetworking

3. Use xen-tools to perform the initial install of the VM's, it does
good job taking care of lots of small details. The default config file
is heavily commented.
http://www.virtuatopia.com/index.php/Building_a_Xen_Guest_Domain_using_Xen-Tools

> I have had so many issues trying to just get one vm running. make a cfg
> file i get errors about installation files or hotplug issues.
I guess it's possible to debug it as is, but, IMHO, it does not worth
it. You definitely should consider to change the storage model.

This, in most points, repeats what Casey wrote, his advice about the
documentation is definitely valid as well.

--
Alexandre Kouznetsov


_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
On Tue, 2012-06-05 at 04:35 +0100, Bill Beauchemin wrote:
> My main question is if nthere is a tutorial that can help me with
> getting xen installed and configured correctly, configure a guest,
> install a guest, and boot the guest using the above configuration?

The Debian wiki has a page on Xen which covers the basic host install
http://wiki.debian.org/Xen . I've been working on this page recently, if
anything isn't clear or you think could be expressed better please do
feel free to edit it (or just send me your feedbak).

That same page also has some discussion of guest install methods, e.g.
using the xen-tools package (which builds on debootstrap). Another
option for installing a Debian guest is to use the normal Debian
installer. This is described in:
http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer

Some other pages of interest:
http://wiki.xen.org/wiki/Category:Debian
http://wiki.xen.org/wiki/Category:Host_Install
http://wiki.xen.org/wiki/Category:Guest_Install
http://wiki.xen.org/wiki/Getting_Started

As others have mentioned you are probably better off using LVM than
dedicating actual partitions to the guests (although this will work).

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
Also http://wiki.xen.org/wiki/Xen_Beginners_Guide is a guide that shows
how to get started with “Squeeze” and Xen 4

On 06/06/2012 10:07, Ian Campbell wrote:
> On Tue, 2012-06-05 at 04:35 +0100, Bill Beauchemin wrote:
>> My main question is if nthere is a tutorial that can help me with
>> getting xen installed and configured correctly, configure a guest,
>> install a guest, and boot the guest using the above configuration?
> The Debian wiki has a page on Xen which covers the basic host install
> http://wiki.debian.org/Xen . I've been working on this page recently, if
> anything isn't clear or you think could be expressed better please do
> feel free to edit it (or just send me your feedbak).
>
> That same page also has some discussion of guest install methods, e.g.
> using the xen-tools package (which builds on debootstrap). Another
> option for installing a Debian guest is to use the normal Debian
> installer. This is described in:
> http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer
>
> Some other pages of interest:
> http://wiki.xen.org/wiki/Category:Debian
> http://wiki.xen.org/wiki/Category:Host_Install
> http://wiki.xen.org/wiki/Category:Guest_Install
> http://wiki.xen.org/wiki/Getting_Started
>
> As others have mentioned you are probably better off using LVM than
> dedicating actual partitions to the guests (although this will work).
>
> Ian.
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
On 6 Jun 2012 at 11:17, Lars Kurth wrote:

> > That same page also has some discussion of guest install methods, e.g.
> > using the xen-tools package (which builds on debootstrap). Another
> > option for installing a Debian guest is to use the normal Debian
> > installer. This is described in:
> > http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer
> >
> > Some other pages of interest:
> > http://wiki.xen.org/wiki/Category:Debian
> > http://wiki.xen.org/wiki/Category:Host_Install
> > http://wiki.xen.org/wiki/Category:Guest_Install
> > http://wiki.xen.org/wiki/Getting_Started
> >
> > As others have mentioned you are probably better off using LVM than
> > dedicating actual partitions to the guests (although this will work).
> >
> > Ian.

Thanks Ian and thanks to all that gave me some good info.

I did get both guests up and running but i did use two separate partitions and LVM. I do
have a few issues.

br0 and br1 wont start upon dom0 startup. I have added ifup br0 and ifup br1 to rc.local to
get them to start.

on guest1 using ifconfig I see eth1. Eth1 is not configured in /etc/network/interfaces so it
shouldn't show up. It is not working as you can not ping its ip. Guest2 does use eth1 and not
eth0.

issueing xm list shows guest1 as running but guest2 shows a b for blocked but it is running
and I can use it.

Big question is how do I get these two guests to autostart if the server is rebooted?


Bill Beauchemin
B2 Bass Adventures
Newark, Ca. 94560
(510) 552-7571


_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
On Wed, 2012-06-06 at 15:34 +0100, bill@b2bassadventures.com wrote:
> On 6 Jun 2012 at 11:17, Lars Kurth wrote:
>
> > > That same page also has some discussion of guest install methods, e.g.
> > > using the xen-tools package (which builds on debootstrap). Another
> > > option for installing a Debian guest is to use the normal Debian
> > > installer. This is described in:
> > > http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer
> > >
> > > Some other pages of interest:
> > > http://wiki.xen.org/wiki/Category:Debian
> > > http://wiki.xen.org/wiki/Category:Host_Install
> > > http://wiki.xen.org/wiki/Category:Guest_Install
> > > http://wiki.xen.org/wiki/Getting_Started
> > >
> > > As others have mentioned you are probably better off using LVM than
> > > dedicating actual partitions to the guests (although this will work).
> > >
> > > Ian.
>
> Thanks Ian and thanks to all that gave me some good info.
>
> I did get both guests up and running but i did use two separate partitions and LVM. I do
> have a few issues.
>
> br0 and br1 wont start upon dom0 startup. I have added ifup br0 and ifup br1 to rc.local to
> get them to start.

Do you have "auto br0" etc in your /etc/network/interfaces?

If you still have problems then please show us the config you are using.

> on guest1 using ifconfig I see eth1. Eth1 is not configured in /etc/network/interfaces so it
> shouldn't show up. It is not working as you can not ping its ip. Guest2 does use eth1 and not
> eth0.

I'm not entirely sure what you are describing here, can you describe
what you do see vs. what you expected to see?

Did you expect to see eth1 in guest1? or did you expect to see eth0?

What does guest1's vif configuration line look like?

If you expected eth0 then you might have an issue with the udev
persistent net rules, look under /etc/udev/rules.d for things which
might be renaming eth0->eth1 on boot.

If you expected eth1 then obviously you need to have eth1 in the
guest's /etc/network/interfaces if you want to use it.

> issueing xm list shows guest1 as running but guest2 shows a b for blocked but it is running
> and I can use it.

blocked just means the guest is idle (i.e. it is blocked in the
hypervisor). It is still available to run if something happens. On a
mostly idle system most guests will be blocked...

> Big question is how do I get these two guests to autostart if the server is rebooted?

The xendomains initscript can do this for you. IIRC you just need to put
the config files in /etc/xen/auto instead of /etc/xen.

Ian.



_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
Re: xen tutorials? [ In reply to ]
On 6 Jun 2012 at 15:48, Ian Campbell wrote:


> > br0 and br1 wont start upon dom0 startup. I have added ifup br0 and ifup br1 to rc.local to
> > get them to start.
>
> Do you have "auto br0" etc in your /etc/network/interfaces?
>
> If you still have problems then please show us the config you are using.
>
Thanks for that. Clean forgot about the auto part in the file.

On your other questions/answers I have to get back to ya. Im under a tight schedual today.
Im retired on disability and do the linux stuff to supliment my income. I also am a bass
fishing guide and I have a 4 day trip to get ready for today. Ill try and get back to ya later
today if not it will be monday


> > on guest1 using ifconfig I see eth1. Eth1 is not configured in /etc/network/interfaces so it
> > shouldn't show up. It is not working as you can not ping its ip. Guest2 does use eth1 and not
> > eth0.
>
> I'm not entirely sure what you are describing here, can you describe
> what you do see vs. what you expected to see?
>
> Did you expect to see eth1 in guest1? or did you expect to see eth0?
>
> What does guest1's vif configuration line look like?
>
> If you expected eth0 then you might have an issue with the udev
> persistent net rules, look under /etc/udev/rules.d for things which
> might be renaming eth0->eth1 on boot.
>
> If you expected eth1 then obviously you need to have eth1 in the
> guest's /etc/network/interfaces if you want to use it.
>
> > issueing xm list shows guest1 as running but guest2 shows a b for blocked but it is running
> > and I can use it.
>
> blocked just means the guest is idle (i.e. it is blocked in the
> hypervisor). It is still available to run if something happens. On a
> mostly idle system most guests will be blocked...
>
> > Big question is how do I get these two guests to autostart if the server is rebooted?
>
> The xendomains initscript can do this for you. IIRC you just need to put
> the config files in /etc/xen/auto instead of /etc/xen.
>
> Ian.
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users
>



Bill Beauchemin
B2 Bass Adventures
Newark, Ca. 94560
(510) 552-7571


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