Archive for the ‘Citrix Xen’ Category

Citrix:Useful link

Thursday, October 20th, 2011

(a) How to create local lvm in Citrix Xen

To create a local lvm SR on /dev/sdb use the following command.
xe sr-create host-uuid=<valid_uuid> content-type=user \
name-label=<"Example Local LVM SR"> shared=false \
device-config:device=/dev/sdb type=lvm

(b) How to Create a Raw Logical Volume Manager Virtual Disk Infrastructure

xe vdi-create sm-config:type=raw sr-uuid=687a023b-0b20-5e5f-d1ef-3db777ce7ae4 name-label="My Raw LVM VDI" virtual-size=8GiB type=user

(c)How to attach a new hardirve and make it available for citrix xen >
Suppose We have a attach a new hard drive /dev/sdb and we want to attach this one with the existing citrix xen server. Before we do anything, we need to create a new Sr by using bellow command.

xe sr-create host-uuid=fb187e42-d757-4c81-a996-84f7054f1f49 content-type=user name-label="posrep" shared=false device-config:device=/dev/sdb type=lvm

it will create a new Sr and from XenCenter you will see the new storage as posrep.

(d) How to find the host-uuid

xe host-list
uuid ( RO)                :  
          name-label ( RW): xen2.local.lan
    name-description ( RW): Default install of XenServer

the valid-uuid is : fb187e42-d757-4c81-a996-84f7054f1f49
(e)How to Adjust Virtual CPU Count for Domain0 on XenServer 5.6 Feature Pack 1

Note: A maximum of eight vCPU’s can be assigned.
   1. Use a text editor at the console of your XenServer  to edit the following file:
   2. Change the value in this line from 4 to the number of vCPUs you would like assigned to Dom0.
      This change leaves one vCPU assigned to Dom0
   3. Run the following command for the change to take effect:
      service unplug-vcpus start
      Rebooting is NOT required when DECREASING the vCPU count.
      Reboot IS required when INCREASING the vCPU count.
   4. To verify that the adjustment is active, run the following command:
      cat /proc/cpuinfo

how to update the static memory range of a virtual machine:

get the Uid of the vm

xe vm-list
 xe vm-list
uuid ( RO)           : e203d2f0-ceb1-db50-d9d0-1dcd4854db32
     name-label ( RW): posrep
    power-state ( RO): running

Now set the static-min,dynamic-min , dynamic-max and static-max

xe vm-memory-limits-set \
uuid=<uuid> \
static-min=<value> \
dynamic-min=<value> \
dynamic-max=<value> static-max=<value>
example :
xe vm-memory-limits-set uuid=e203d2f0-ceb1-db50-d9d0-1dcd4854db32 static-min=20480MiB dynamic-min=20480MiB dynamic-max=20480MiB static-max=20480MiB

check if it has been effected by bellow command

 xe vm-param-get uuid=e203d2f0-ceb1-db50-d9d0-1dcd4854db32 param-name=memory-dynamic-max;

(g) Citirx Live motion
(h)How to add snmp