Difference between revisions of "Using XAPI - preparing the toolstack"
|Line 59:||Line 59:|
Revision as of 04:41, 26 June 2014
Ensure that xapi is running with "service xcp-xapi status". If you don't get the response "* xapi is running", you will need to run "service xcp-xapi start".
Set up your path:
Set up a storage repository. For now, we recommend NFS, or EXT if you have an unused block device. For example:
SR=`xe sr-create type=nfs name-label=nfs device-config:server=<nfs server> device-config:serverpath=<path on server>`
Note: DANGER!!! The partition selected will be formatted, and all data on it wiped. Ensure that you select the device correctly and that you have backed up any existing information on this partition.
SR=`xe sr-create type=ext device-config:device=/dev/sda3 name-label=ext`
Set this as pool default SR:
POOL=`xe pool-list --minimal` xe pool-param-set uuid=$POOL default-SR=$SR
Memory and Dom0
There is a bug within the 3.0 series kernel that is shipped with Oneiric, but is fixed in the 3.2 kernel which should be shipped with Precious, where mis-reporting of memory leads xapi and squeezed to reduce (sometimes significantly!) the amount of memory available to Dom0.
Note: certain versions of the package which installed squeezed failed to set the relevant scripts to start it at boot. Ensure that you have the latest release, and that you have checked that squeezed is running -
ps ax | grep squeezed
- before completing the steps below.
Your Dom0 should never be set to consume all of your physical memory (otherwise - where would guest VMs run?), but if, on initially running xapi, you notice that performance has suddenly dropped significantly, check the amount of memory available via
(MemTotal, quoted in bytes). If this seems ridiculously low, then you will need to set hard parameters for the amount of memory assigned to Dom0. First you need to find the uuid of Dom0 thus:
The first entry should look at little like this:
uuid ( RO) : f5d0039b-1138-4635-c153-6203bfdc330f name-label ( RW): Control domain on host: piggy power-state ( RO): running
We will use this as an example.
Next, you need to decide how much memory to give Dom0. In our example, we are going to give it 2 GiB. Run the following commands, substituting the correct uuid and memory parameters:
xe vm-param-set uuid=f5d0039b-1138-4635-c153-6203bfdc330f memory-dynamic-max=2GiB xe vm-param-set uuid=f5d0039b-1138-4635-c153-6203bfdc330f memory-dynamic-min=2GiB
Note that this will work around the problem, but will not allow Xen to adjust the amount of memory available to Dom0 automatically. Reboot your machine (start squeezed manually if required), and check meminfo again. Note that you will not see the entire amount of memory assigned - some will be used - but you can now balance this correctly.