Using my tutorials it's fairly easy to install Linux... as long as I've written a tutorial for it. It's also fairly easy to start and stop your VMs... if you understand the XE command or you've installed xenapi-admin-tools. If you're the type of person who appreciates a good graphical interface you can run Citrix' own Xencenter software which does a great job. However it's a Windows application so if you (like me) don't run Windows then you can't easily run Xencenter. There is a free GUI based management tool named XVP that allows you to do simple administration of your VMs like starting and stopping them. It also handles the messiness of tunneling through network and firewalls to provide a VNC console on your local desktop which can be very handy if you want to do a graphical install.

 

There are two ways to getting XVP to run on your xapi cloud:

  1. Create a CentOS VM and install/configure all of the XVP packages
  2. Download the XVP Appliance VM image and run it

We will choose the latter as it's a great deal easier to do. 

 

Creating a download location large enough for the xvpappliance VM image

You have an issue with just downloading the XVP Appliance and importing it into XCP as the image is too big for the stock XCP Operating System drive so we will remedy this by creating an ext3 formatted Logical Volume to store the image in temporarily.

Get the name of your  Storage Repository named "Local Storage". This would be the default SR created on install. 

[root@testcloud1]# xe sr-list
uuid ( RO)                : 735f9d8e-64eb-71b7-9fd4-47c342c7c9e4
          name-label ( RW): Local storage
    name-description ( RW): 
                host ( RO): testcloud1
                type ( RO): lvm
        content-type ( RO): user

 

 

Now get the name of the LVM Volume Group associated with it. 

[root@testcloud1]# vgs
  VG                                                 #PV #LV #SN Attr   VSize   VFree  
  VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4   1   7   0 wz--n- 181.91G 115.84G

 

We can see the Volume Group is named VG_XenStorage-<UUID of Local Storage SR>.  We can also see that there is 115.84 GB of free space on it which is perfect. Now we will create a new Logical Volume 10 GB in size named TESTLV in the Volume Group named VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4. NOTE: Your  Volume Group will be named something different. Due to the long lines a break (\) has been inserted.

[root@testcloud1 share]# lvcreate -L 10G -n TESTLV \
VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4   Logical volume "TESTLV" created

 

Format the new Logical Volume as ext3. Due to the long lines a break (\) has been inserted.

[root@testcloud1 ]# mkfs -t ext3 \ 
/dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1310720 inodes, 2621440 blocks 131072 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2684354560 80 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

 

Now make a mountpoint (/media/TESTLV) and mount the new Logical Volume. After being mounted we use the df command to check for free space. Due to the long lines a break (\) has been inserted.

[root@testcloud1]# mkdir /media/TESTLV
[root@testcloud1]# mount /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV \ 
/media/TESTLV/ [root@testcloud1]# df -h /media/TESTLV Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG_XenStorage--735f9d8e--64eb--71b7--9fd4--47c342c7c9e4-TESTLV 9.9G 151M 9.2G 2% /media/TESTLV

 

Installing XVP

Now that you have a place to put the VM image we can download the zipped image to your new formatted Logical Volume. Go to http://www.xvpsource.org/?topic=releases&page=download and copy and paste the xvpappliance link. At the time of this writing it was http://xvpmirror.webguyz.net/xvpappliance-1.15.0-1.zip. 

[root@testcloud1]# cd /media/TESTLV/
[root@testcloud1 TESTLV]# wget http://xvpmirror.webguyz.net/xvpappliance-1.15.0-1.zip

 

Once xvpappliance is downloaded unzip it and import the image into XCP. This may take a while as the xva formatted image file is 1.9 GB extracted.

[root@testcloud1 TESTLV]# unzip xvpappliance-1.15.0-1.zip 
Archive:  xvpappliance-1.15.0-1.zip
inflating: xvpappliance-1.15.0-1.xva  
[root@testcloud1 TESTLV]# xe vm-import filename=xvpappliance-1.15.0-1.xva 

 

Verify the xe vm-import worked by listing the xvpappliance VM.

[root@testcloud1 TESTLV]# xe vm-list name-label=xvpappliance[root@testcloud1 TESTLV]# cd ..
[root@testcloud1 media]# umount /media/TESTLV 
[root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV
Do you really want to remove active logical volume TESTLV? [y/n]: y
  Logical volume "TESTLV" successfully removed
[root@testcloud1 TESTLV]# cd ..
[root@testcloud1 media]# umount /media/TESTLV 
[root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV
Do you really want to remove active logical volume TESTLV? [y/n]: y
  Logical volume "TESTLV" successfully removed
[root@testcloud1 TESTLV]# cd ..
[root@testcloud1 media]# umount /media/TESTLV 
[root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV
Do you really want to remove active logical volume TESTLV? [y/n]: y
  Logical volume "TESTLV" successfully removed

uuid ( RO)           : 2d3fb5e7-4ea7-69f4-e652-1895995ca4b6
     name-label ( RW): xvpappliance
    power-state ( RO): halted
 

 

Turn off VNC so our commandline console works on the xvpappliance VM and boot it up. We will need the xvpappliance UUID for this.

[root@testcloud1 TESTLV]# xe vm-list name-label=xvpappliance
uuid ( RO)           : 2d3fb5e7-4ea7-69f4-e652-1895995ca4b6
     name-label ( RW): xvpappliance
    power-state ( RO): halted

[root@testcloud1 TESTLV]# xe vm-param-set uuid=2d3fb5e7-4ea7-69f4-e652-1895995ca4b6 \
other-config:disable_pv_vnc=1 [root@testcloud1 TESTLV]# xe vm-start name-label=xvpappliance 

 

Configure XVP


Connect to the console and configure the xvpappliance

[root@testcloud1 TESTLV]# xe console name-label=xvpappliance
Connecting to console on VM xvpappliance. Press Ctrl + ']' to quit.

BAD PASSWORD: it is WAY too short
Retype new UNIX password: 
Sorry, passwords do not match.
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

Currently set timezone is Europe/London

Do you want to change this? [n]: 
Appliance hostname including domain: xvpappliance.test.com
Appliance IP address: 192.168.1.15
Subnet mask: 255.255.255.0
Default gateway address: 192.168.1.1
First DNS server IP address: 192.168.1.1
Do you want to specify a second DNS server? [n]: 
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  [  OK  ]
Reloading sshd: [  OK  ]

Please specify an existing email address to receive email notifications
from this appliance, and the name of an SMTP email gateway through which
this appliance may send emails.  You can change these settings again later
and send test emails using the "Configure email" menu option.

Enter email address: This email address is being protected from spambots. You need JavaScript enabled to view it.

Hostname of outgoing email gateway: test.com
Does this gateway require authentication? [n]: 
Starting sendmail: [  OK  ]
Starting sm-client: [  OK  ]

Use a proxy server when fetching software updates? [n]: 

How frequently do you want to check for software updates:

    1. Hourly
    2. Daily[root@testcloud1 TESTLV]# cd ..
[root@testcloud1 media]# umount /media/TESTLV 
[root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV
Do you really want to remove active logical volume TESTLV? [y/n]: y
  Logical volume "TESTLV" successfully removed

    3. Weekly
    4. Monthly
    5. Never

Please enter selection: 2
Schedule successfully updated
Starting yum-updatesd: [  OK  ]

Redirect users from HTTP to HTTPS for security? [y]: 
Tunnel VNC console connections via HTTP/HTTPS? [n]: 
Create new SSL certificate for HTTPS? [y]: 

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:WA
Locality Name (eg, city) [Newbury]:Seattle
Organization Name (eg, company) [My Company Ltd]:TEST           
Organizational Unit Name (eg, section) []:http://grantmcwilliams.com/item/654-install-xvp-appliancehttp://grantmcwilliams.com/item/654-install-xvp-appliance
Common Name (eg, your name or your server's hostname) []:xvpappliance      
Email Address []:
Use LDAP-based user authentication (e.g. Active Directory)? [n]: 
Starting httpd: [  OK  ]
Please add one or more XenServer or Xen Cloud Platform pools or standalone
servers you wish the appliance to manage.  For each, you will need to specify
a server hostname or IP address (for a pool, this can be any pool member
that's running), and an existing server username (usually "root") and
associated password.

You may also specify a tag prefix, used to group VMs when displaying in web
browsers.  For details see the manual page for xvpdiscover.  If you don't
want a tag prefix, just hit Enter when asked for one.

Select an option:

    1. Add a pool
    2. Finish configuring pools

Please enter selection: 1
Group tag prefix (optional): 
Server hostname or IP address: 192.168.1.11
Server username: root
Server password: 

Discovered 1 servers and 2 VMs in pool "testcloud1"
Display with a different pool name? [n]: 
Are you sure you want to add this pool? [y]: 

Select an option:

    1. Add a pool
    2. Schedule regular rediscovery of pool details
    3. Finish configuring pools

Please enter selection: 3
Starting xvp: [  OK  ]

Users of the web interface to xvp must specify a username and password
to connect.  Please specify an initial user, who will be granted full
access to all virtual machines.  You can add more users later using the
"Configure xvp users" menu option.

Username: admin
Password: 
Retype password: 

Basic configuration complete.

Users may now access the web interface at:

    http://xvpappliance.test.com
[root@testcloud1 TESTLV]# cd ..
[root@testcloud1 media]# umount /media/TESTLV 
[root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV
Do you really want to remove active logical volume TESTLV? [y/n]: y
  Logical volume "TESTLV" successfully removed

If you wish to change anything, please use the menu items below.

After you quit, you can see this menu again by running:

    /usr/sbin/xvpappliance

For further assistance, visit the xvp website at:

    http://www.xvpsource.org

Press Enter to continue ...

Main menu:

    1. About this program
    2. Configure timezone
    3. Configure network
    4. Configure email
    5. Configure xvp pools
    6. Configure xvp users
    7. Configure web server
    8. Manage software updates
    9. Unconfigure appliance
   10. Quit from program

Press control ] to exit the console.

 

Remove the temporary Logical Volume (if don't have a need for it).

[root@testcloud1 TESTLV]# cd .. [root@testcloud1 media]# umount /media/TESTLV [root@testcloud1 media]# lvremove /dev/VG_XenStorage-735f9d8e-64eb-71b7-9fd4-47c342c7c9e4/TESTLV Do you really want to remove active logical volume TESTLV? [y/n]: y Logical volume "TESTLV" successfully removed



Using XVP 

To use XVP just point your web browser to the IP address you specified above. In my case it was 192.168.1.15.  It will ask you to accept the unsigned certificate and log in. Login with the username and password you entered above as well.

 

Have fun!