It's worth learning how to do Xen from the CLI in my opinion. Doing so will
also strengthen your general Linux sysadmin skills. Xen is an immensely
powerful tool and runs the bare metal hypervisors (on top of the Linux
kernel) of AWS and other large scale cloud things.


One of the prerequisites is setting up an LVM volume group to create
logical volumes inside of.


The "xl" CLI tool for xen is quite easy to use, and the basic template for
a Xen paravirtualized machine is not so hard...  Here's a few things copied
and pasted from my notes. This is from my test and development xen machine
which runs debian jessie amd64.

sudo pvdisplay
[sudo] password for eric:
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg0
  PV Size               101.27 GiB / not usable 4.46 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              25923
  Free PE               2499
  Allocated PE          23424
  PV UUID               2Z7Kcr-doVc-S8L8-5ARa-d5BG-JGnt-V0pGgt


so we have a single partition on /dev/sda (a fast 128GB SSD) which is the
physical volume.

LVM always works like: Physical volume --> volume group --> logical volume

In this case it is really simple since we have only one volume group
defined on the physical volume /dev/sda3


sudo vgdisplay
  --- Volume group ---
  VG Name               vg0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  59
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                20
  Open LV               19
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               101.26 GiB
  PE Size               4.00 MiB
  Total PE              25923
  Alloc PE / Size       23424 / 91.50 GiB
  Free  PE / Size       2499 / 9.76 GiB
  VG UUID               3clHfR-6x0g-4TrE-c3WS-qqoS-3U17-7Y2UcR



so then the various logical volumes are created inside of that, here's what
the setup looks like for a requesttracker test machine:

if I do "sudo lvdisplay" and copy just the parts it spits out for a single
virtual machine:

  --- Logical volume ---
  LV Path                /dev/vg0/requesttracker-swap
  LV Name                requesttracker-swap
  VG Name                vg0
  LV UUID                eyFYu1-wGgt-FwJH-0wAR-IIrp-1wvL-KGcljJ
  LV Write Access        read/write
  LV Creation host, time mantu-dom0, 2014-09-06 21:07:49 -0700
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Path                /dev/vg0/requesttracker-disk
  LV Name                requesttracker-disk
  VG Name                vg0
  LV UUID                jAwArd-MFSQ-h1pK-Kymc-VTwk-eYJE-2laTZm
  LV Write Access        read/write
  LV Creation host, time mantu-dom0, 2014-09-06 21:08:31 -0700
  LV Status              available
  # open                 1
  LV Size                14.00 GiB
  Current LE             3584
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1


each test and development virtual machine on this host has just two logical
volumes, one for the root disk and one for swap disk.

If I ssh into the requesttracker vm and look at its disks, /dev/xvda1 is
the swap disk and /dev/xvda2 is the root disk. These show up the same way a
/dev/sda physical device would.


The actual xen configuration of the VM is also for a debian jessie amd64 PV
machine, here's a copy and paste of its config file:

etc/xen/auto$ more requesttracker.cfg
#
# Configuration file for the Xen instance requesttracker, created
# by xen-tools 4.4 on Sat Sep  6 21:12:52 2014.
#

#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-3.16.0-4-amd64'
extra       = 'elevator=noop'
ramdisk     = '/boot/initrd.img-3.16.0-4-amd64'

vcpus       = '2'
memory      = '512'


#
#  Disk device(s).
#
root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/vg0/requesttracker-disk,xvda2,w',
                  'phy:/dev/vg0/requesttracker-swap,xvda1,w',
              ]


#
#  Physical volumes
#


#
#  Hostname
#
name        = 'requesttracker'

#
#  Networking
#
vif         = [ 'ip=10.0.0.30 ,mac=00:16:3E:D8:70:6F,bridge=xenbr0' ]

#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'






On Fri, Nov 20, 2015 at 9:14 AM, David <dmilho...@wletc.com> wrote:

> I am doing a home brew vmhost at home and I am tossing around using XEN vs
> Vmware like I use at the office.
> From what I gather of Xen alot is done within the CLI but I am looking for
> a client like VMware host client that will
> give me the gui interface to manage host on XEN
>
> Any ideas or thoughts are welcome
>
> --
>

Reply via email to