Getting Started with Xen
I'm using a Xen Virtual Server to provide my Linux students with their own machines with admin rights. This has prompted interest in Xen from a lot of people just starting out in Virtualization. Following is a quick explaination of Xen and how to get a Virtual Machine up and running as fast as possible.
Hypervisors
Xen is a hypervisor meaning that it runs above the hardware but below any OS. Traditionally when you "virtualized" an OS you'd have a computer that you logged into which you installed virtualization software on such as VMWare workstation or VirtualBox. With this software you'd start the Virtual Machine from it's GUI and install the Guest OS via CDROM. In this case you have a Host Machine (the real physical machine) and a Guest Machine (the virtualized OS). With a hypervisor ALL operating systems are virtualized. This might seem a bit strange or impossible but is very powerful and extremely effecient. The side effect is that Xen can be very complex to set up. Let me explain the Xen boot process.
Xen Boot Process
- Machine runs code in Master Boot Record
- Bootloader loads the OS kernel
- Xen lodges itself in memory and loads the rest of the kernel in a Virtual Machine
- The user logs into the first Virtual Machine and starts, stops and restarts the other Virtual Machines from there
The name for the first Virtual Machine is Dom0 - it's the privileged Domain so it has direct access to the physical hardware. All subsequent Virtual Machines that are started are called DomU - unprivileged Domains. To manage a Xen Virtual Server you log into the Privileged Domain (Dom0) and use various commands to administer the Unprivileged Domains (DomUs).
Two modes of Virtualization
Virtualizers work in one of two modes - paravirtualization or hardware (full) virtualization. The difference being that a paravirtualized DomU OS knows it's being virtualized and has extensions to allow and assist in this. Paravirtualized Operating Systems are very fast and effecient. However there are times when you won't be virtualizing an OS that has these extensions such as Windows. In this case you need to use a CPU that has hardware vitualization support and run Xen in HVM (Hardware Virtualization Mode).
Paravirtualization:
- Runs on a lot of hardware - x86, x86-64, Itanium and PowerPC 970 with or without hardware Virtualization support
- DomUs can be Linux, NetBSD and Solaris
- Very fast
Full Virtualization:
- Requires Intel or AMD cpus with Virtualization Support built in
- DomUs can be most any unmodified OS including Windows
- Not so fast
To get around the speed issues with Full Virtualization there are paravirtualized drivers that have been written for many Operating Systems including Windows for disk access and network cards. This allows Full Virtualization to reach the speeds of paravirtualization in these two areas without requiring further modification to the Operating System. The Linux KVM Hypervisor runsin Full Virtualization mode all the time and thus needs paravirtualized drivers.
Install git on XCP host
To develop the Xenapi Admin Tools for the Xenapi Admin Project I install git on the XCP host so I can write tools and keep the github project up to date as well. Following is how to get git working on XCP 1.6. To develop tools I just mount my XCP hosts / partitoin on my development machine via sshfs so I can edit tools remotely. When I'm satisfied with the tools I commit them using git commit -a followed by git push to send the changes to the xenapi-admin-tools github repository.
Add the EPEL repo, install git then disable the repo
We add the EPEL repo (which is necessary), install git and then disable the repo immediately to keep other system specific packages from updating.
rpm -ivh http://mirror.itc.virginia.edu/fedora-epel/5/i386/epel-release-5-4.noarch.rpm yum install git sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
Configuring git
To use git to clone our Xenapi Admin Tools repository you'll need to set a few configuration items. Change "Your User Name" to your actual username you want to authenticate with. Change "Your Email Address" to your own email address.
git config --global user.name "Your User Name"
git config --global user.email "Your Email Address" git config --global credential.helper cache git config --global credential.helper 'cache --timeout 3600'
Clone the xenapi-admin-tools github and add it to your PATH (OPTIONAL)
Cloning the github repo is pretty easy. Below we clone the Xenapi Admin Projects tools repo which will create a /root/xenapi-admin-tools directory. The tools are in xenapi-admin-tools/releases/<version number> but to use them we'll need to add that directory to our system $PATH variable.
cd /root git clone https://github.com/Xenapi-Admin-Project/xenapi-admin-tools.git echo 'PATH="$PATH:/root/xenapi-admin-tools/releases/4.1"' >> ~/.bashrc
Install XCP from a USB thumbdrive
Prerequisites
Software
If you're using Windows you need to download Unetbootin. Most Linux distributions include it in their repositories so you can install it using the standard Linux package managers (yum, apt-get, zypper,synaptic etc.). You will also need to download the Xen Cloud Platform installation CD and save it somewhere.
Setting up the USB thumb drive
The USB thumbdrive has to have a partition on it and it has to be formatted FAT32. Unetbootin will let you use other Thumbdrives but they just won't work and they won't really tell you why. Just make it FAT32 and you shouldn't have any problems.
- Make yourself root using su or sudo.
- fdisk <device>
- Create a new partition and change the partition type to vfat
- Save the partition
- Format it using mkfs -t vfat <device>

Installing XCP on the thumbdrive
- Mount the partition with the mount command or just remove the thumb drive and reinsert it (usually works)
- Start unetbootin
- Select Diskimage and then your XCP 1.6 ISO image that you downloaded
- Select USB Drive under Type
- Select your thumb drive device
- Press OK

Fixing the thumbdrive so it will boot properly
- cd into your mounted thumbdrive
- Rename boot/isolinux/isolinux.cfg to boot/isolinux/syslinux.cfg
- Rename boot/isolinux boot/syslinux
- Rename syslinux.cfg syslinux.cfg.bak

You're done. Insert the thumbdrive into your future XCP host and reboot. You may need to go into the BIOS to change the boot order so it will boot from a USB device.
Notes:
- Although I mentioned you can do this from Windows I won't be providing any support for it because I don't use Windows
- The thumbdrive needs to be formatted as FAT32 only
- Unetbootin has a tendency to just add files to the thumbdrive so make sure you format the thumbdrive between uses
- Not renaming the syslinux/isolinux files will get you an Unfound kernel error on boot
Install Xen 3.4 on CentOS 5 (32 bit) the easy way
1. First we need to add the YUM repository holding the updated Xen. You will need to be logged in as root to carry out these instructions
wget http://www.gitco.de/linux/i386/centos/5/CentOS-GITCO.repo -O /etc/yum.repos.d/CentOS-GITCO.repo
2. Uninstall and reinstall the Virtualization group
yum groupremove Virtualization
yum update
yum clean all
yum groupinstall -y Virtualization
Install Xen 3.4 on CentOS5 (64bit) the easy way
1. First we need to download the YUM repository file for the updated Xen. Then uninstall the old Virtualization group and reinstall it. This will upgrade the packages.
wget http://www.gitco.de/linux/x86_64/centos/5/CentOS-GITCO.repo -O /etc/yum.repos.d/gitco.repo
yum groupremove Virtualization
yum groupinstall -y Virtualization
Yum will probably want to upgrade some other files along with the ones we've chosen.
Warning! If you get an error message from grubby this is bad!
Installing: kernel-xen ####################### [ 9/13]
grubby fatal error: unable to find a suitable template
This means that your grub.conf file couldn't be written to for whaterver reason so you won't be able to successfully reboot. If you get this message you need to edit your /boot/grub/grub.conf file and make the kernel lines match the kernel you installed.
Get your installed kernel version:
[ root@vs / ] rpm -q kernel-xen
kernel-xen-2.6.18-128.4.1.el5
Now edit your /boot/grub/grub.conf to match this
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/vgsys/lvroot
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.4.1.el5xen)
root (hd0,0)
kernel /xen.gz-3.4.0
module /vmlinuz-2.6.18-128.4.1.el5xen ro root=/dev/vgsys/lvroot rhgb quiet
module /initrd-2.6.18-128.4.1.el5xen.img
4. Reboot - no really I mean it.
5. Try it out by using the xm dmesg command
\ \/ /___ _ __ |___ / |___ / / _ \
\ // _ \ '_ \ |_ \ |_ \| | | |
/ \ __/ | | | ___) | ___) | |_| |
/_/\_\___|_| |_| |____(_)____(_)___/
(XEN) Xen version 3.3.0 (
This email address is being protected from spambots. You need JavaScript enabled to view it.
) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) Tue Sep 9 20:18:14 CEST 2008
(XEN) Latest ChangeSet: unavailable
(XEN) Command line:
(XEN) Video information:
(XEN) VGA is text mode 80x25, font 8x16
(XEN) VBE/DDC methods: V2; EDID transfer time: 2 seconds
(XEN) Disc information:
(XEN) Found 1 MBR signatures
(XEN) Found 1 EDD information structures
(XEN) Xen-e820 RAM map:
That's about all. If you have any questions drop a comment here.
Install xen-tools on CentOS 5.x
Download xen-tools, install rpmstrap and install xen-tools. If there's a newever version of xen-tools available substitute that filename
yum install -y rpmstrap
wget http://xen-tools.org/software/xen-tools/xen-tools-3.9.tar.gz
tar -xzvpf xen-tools-3.9.tar.gz
cd xen-tools-3.9/
make install
I've not using xen-tools that much but I wanted to put together a tutorial anyway. Let me know how it goes.
Install Xenapi Admin Tools from github
The Xenapi Admin Tools are starting to become so useful that I don't like having XCP hosts without them. Currently you can go to http://xenapi-admin-project.github.com/xenapi-admin-tools/ and download the archive onto your host, extract it and then copy the tools to your PATH. This however, is a lot of work since they get updated often. In the coming weeks (months?) I'll be finishing the Yum repo for Xenapi Admin Tools so the XCP package manager can keep them up to date. Until I get that accomplished however it may be easier to just install git and clone the github repository. Every time you want to get updates you'd just cd into the xenapi-admin-tools directory and run git pull.
With that in mind we have to add the EPEL repository where git is housed in order to use Yum to install it.
Install the EPEL repo
rpm -ivh http://mirror.itc.virginia.edu/fedora-epel/5/i386/epel-release-5-4.noarch.rpm
Install git
yum install git
Disable EPEL repo
The EPEL repository is enabled by default so we didn't have to do anything special to install git. However, you may not want it enabled all the time because packages that EPEL hosts may replace XCP specific packages and mess up your system
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
Configuring git
To use git to clone our Xenapi Admin Tools repository you'll need to set a few configuration items.
git config --global user.name "Your User Name"
git config --global user.email "Your Email Address" git config --global credential.helper cache git config --global credential.helper 'cache --timeout 3600'
Now that git is configured you'll want to clone the repository.
cd /root
git clone https://github.com/Xenapi-Admin-Project/xenapi-admin-tools.git
This will create a xenapi-admin-tools directory in /root. The tools are in xenapi-admin-tools/releases/<version number> so you'll probably want to copy them to somewhere in the system PATH (or make a symbolic link). I personally use a /root/bin directory to hold them.
Install XenWebManager Appliance
Possibly the easiest way to get a graphical management interface running on XCP is to use the Xen Web Manager Appliance. The appliance is a complete Virtual Machine with XenWebManager installed and ready to run.
These commands should be typed into your XCP cloud host.
1. Download and import the appliance
This is a very long URL from Sourceforge but it does work if you copy and paste it.
cd ~
wget http://downloads.sourceforge.net/project/xenwebmanager/appliances/xenwebmanager.xva.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fxenwebmanager%2F&ts=1365405701&use_mirror=superb-dca3 gunzip xenwebmanager.xva.gz xe vm-import filename=xenwebmanager.xva
2. Verify the appliance and start it
[root@testcloud1 ~]# xe vm-list name-label=xenwebmanager
uuid ( RO) : 70f63ce4-b775-22c6-a556-a03a7bea6220
name-label ( RW): xenwebmanager
power-state ( RO): halted
[root@testcloud1 ~]# xe vm-start name-label=xenwebmanager
3. Get the IP address of the appliance
Opening a console on the VM is done differently on XCP 1.0/1.1 then it is on XCP 1.5/1.6. Copy and paste these instructions.
On XCP 1.0/1.1
DOMID=$(xe vm-list name-label=xenwebmanager params=dom-id) /usr/lib/xen/bin/xenconsole $DOMID
On XCP 1.5/1.6
xe console vm=xenwebmanager
Log with the following credentials
Username: root Password: xenwebmanager
Get appliance IP address
Once we've logged into our Appliance get the IP address using the ifconfig command.
[root@xenwebmanager ~]# ifconfig
eth0 Link encap:Ethernet HWaddr B2:5C:69:8C:22:1E
inet addr:192.168.1.147 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::b05c:69ff:fe8c:221e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2377 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:273930 (267.5 KiB) TX bytes:7146 (6.9 KiB)
My appliance IP address is 192.168.1.147. Exit the console by pressing the Control Key and the right square bracket - control ]
4. Connect to the appliance
Open a web browser and connect to your appliance IP address on port 8080. My appliance IP is 192.168.1.147 so I would type http://192.168.1.147:8080/ into my web browser Address bar.
5. Configure xenwebmanager to manage your XCP pool
Once you've connected to your xenwebmanager appliance you need to add your server. Click on the "Add Server" button in the top left hand corner and enter your XCP poolmaster's Hostname, Username and Password.
Install XenWebManager on XCP host
This tutorial is for installing XenWebManager on an XCP host but should work just as well for installing XenWebManager on any Redhat based hosts (CentOS/Fedora).
It's best to install XenWebManager on another machine or even a VM for security reasons but I could see installing it on a host for simplicity's sake.
You will need to be root in order to follow the instructions below.
1. Download and install the packages
cd ~ wget http://iweb.dl.sourceforge.net/project/xenwebmanager/xenwebmanager_beta_full.tar.gz tar -xzvpf xenwebmanager_beta_full.tar.gz cd xenwebmanager/tools bash install_rh.sh
2. Run XenWebManager
Run xenwebmanager service. The install script above already configures it to auto-start on XCP host bootup. To turn auto-start off - chkconfig xenwebmanager off...
service xenwebmanager start
3. Allow port 8080 through the firewall
iptables -A RH-Firewall-1-INPUT -p tcp --dport 8080 -j ACCEPT service iptables save service iptables restart
4. Connect to the XCP Host
Open a web browser and connect to your XCP Host's IP address on port 8080. My host's IP is 192.168.1.147 so I would type http://192.168.1.147:8080/ into my web browser Address bar.
5. Configure xenwebmanager to manage your XCP pool
Once you've connected to XenWebManager you need to add your server. Click on the "Add Server" button in the top left hand corner and enter your XCP poolmaster's Hostname, Username and Password.
Install XVP Appliance
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:
- Create a CentOS VM and install/configure all of the XVP packages
- 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. Neverhttp://grantmcwilliams.com/item/654-install-xvp-appliance
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!