Ceph and libvirt technology preview: Difference between revisions

From Xen
Jump to navigationJump to search
Line 50: Line 50:


= Installing a Windows VM =
= Installing a Windows VM =

== Using XenCenter ==

There is a small bug in XenCenter triggered when a system has no .isos at all. I created a simple [https://github.com/djs55/xenadmin/tree/hyperspace-fixes branch on github] with a fix for this. I've also uploaded a XenCenter binary to http://xenbits.xen.org/djs/XenCenter.exe

This is how I installed windows from an .iso on an NFS server:

# Press the 'new storage' button to create an 'NFS ISO' storage repository.
# Press the 'new VM' button to use the wizard to create a VM from a template and start it installing.

== Using the CLI ==

This is how I installed windows from an .iso I copied onto the CentOS box:

scp windows.iso root@centos:/usr/share/xapi/packages/iso
SR=$(xe sr-list name-label=XenServer\ Tools params=uuid --minimal)
xe sr-scan uuid=$SR
VM=$(xe vm-install template=Windows\ 7\ \(64-bit\) new-name-label=win7)
xe vm-cd-add vm=$VM cd-name=windows.iso device=1
xe vm-start vm=$VM


= Installing a PV linux VM =
= Installing a PV linux VM =

Revision as of 15:03, 7 July 2013

This "technology preview" is an experimental set of software packages which allow you to experiment and play with XenServer (formerly XCP) + CentOS 6.4 + ceph storage + libvirt. Obviously the packages should not be used in production! However now is a good time to play, discover issues, suggest things, build things and generally get involved.

Pre-requesities

You need a CentOS 6.4 x86_64 physical host.

Installing the tech preview

The tech preview consists of an RPM repo for CentOS 6.4 which contains the experimental software. It can be installed by first adding the repository:

rpm -ihv http://xenbits.xen.org/djs/xenserver-tech-preview-release-0.3.0-0.x86_64.rpm

and then installing the xenserver-core metapackage:

yum install -y xenserver-core

Once the packages have been installed, you can create a basic system configuration by running:

xenserver-install-wizard

Note the wizard works best on 'clean' environments (i.e. like that just after a fresh CentOS install). If it fails either: correct the problem and re-run, or perhaps inspect what the script is doing and adapt to your environment. Once the basic configuration is completed, you must reboot your system. Note: it should be possible to polish the script so that a reboot becomes unnecessary.

Once the machine reboots, you should be able to connect XenCenter to the management IP, or to login to dom0 and use the 'xe' CLI (with tab completion)

Observe that:

  1. we're installing the tech preview XenServer via a normal-looking package repository rather than via a custom .iso. Hopefully we'll be able to use 'yum' more in future.
  2. we're installing on top of a vanilla 64-bit CentOS 6.4, rather than a 32-bit CentOS 5.7. Hopefully we'll be able to track the underlying distro more closely in future.

Connecting to ceph storage

Next you must connect your CentOS host to an existing ceph cluster. Typically this involves writing a /etc/ceph/ceph.conf and exchanging keys. Have a look at the Ceph documentation

Before you can run VMs from ceph storage, you must create a XenServer "Storage Repository" (libvirt calls this a "storage pool"). Create a small text file describing the ceph storage, as if you were going to run "virsh pool-create" on it. My sr.xml which describes a ceph pool named "ceph" looks like:

<pool type='rbd'>
  <name>ceph</name>
     <name>rbd</name>
     <host name='10.80.237.208' port='6789'/>
</pool>

Then type

xe sr-create type=libvirt name-label=ceph device-config:xml-filename=sr.xml

You should now be able to manage your ceph SR via XenCenter and the 'xe' CLI.

Installing a Windows VM

Using XenCenter

There is a small bug in XenCenter triggered when a system has no .isos at all. I created a simple branch on github with a fix for this. I've also uploaded a XenCenter binary to http://xenbits.xen.org/djs/XenCenter.exe

This is how I installed windows from an .iso on an NFS server:

  1. Press the 'new storage' button to create an 'NFS ISO' storage repository.
  2. Press the 'new VM' button to use the wizard to create a VM from a template and start it installing.

Using the CLI

This is how I installed windows from an .iso I copied onto the CentOS box:

scp windows.iso root@centos:/usr/share/xapi/packages/iso
SR=$(xe sr-list name-label=XenServer\ Tools params=uuid --minimal)
xe sr-scan uuid=$SR
VM=$(xe vm-install template=Windows\ 7\ \(64-bit\) new-name-label=win7)
xe vm-cd-add vm=$VM cd-name=windows.iso device=1
xe vm-start vm=$VM

Installing a PV linux VM

Architecture diagram

Known issues

Getting involved