The Collection

A collection of useful information.

Filtering by Tag: add

XenServer: Add/Remove Network Interface.

Remove:

  • xe vm-list
  • Copy the uuid for the VM you want to remove the interface.
  • xe vif-list vm-uuid=<vm-uuid>
  • Copy the uuid for the vif you want to destroy.
  • xe vif-destroy uuid=<vif-uuid>
Note you will need to know which device you want to remove if there is more than one interface attached to the VM.

Add:

  • xe list-network (you can add "name-label=<label>" if you know the networks name, in my case Bond 0+1)
  • Copy the networks uuid.
  • xe vif-create network-uuid=<network-uuid> vm-uuid=<vm-uuid> device=#

See above for how to find the VM's uuid, for device replace # with the device number, you can find a list of supported VIF devices by typing "xe vm-param-list uuid=<vm-uuid> | more" and looking for allowed-VIF-devices, if theres no interface currently on the VM you will most likely use 0.

As for why you would want to do all of this...well, sometimes you either don't have access to XenCenter, or it decides it doesn't want to play, it's always a good idea to bring your own ball.

XenServer: Create RAID SR.

A quick How-To: on adding a RAID array as an SR in XenServer, the version I personally used was 5.6 but 5.5 and 5.0 should be identical.

Steps to create an SR in a Xenserver.

Locate the RAID array partition.

cat /proc/partitions

This returns a list of all partitions, find the RAID array and make note of it's name (sda, sdb, sdx, etc.).

Now locate the disk-id.

ll /dev/disk/by-id

This lists disk ID's, look for the ID that matches the partition name from the previous step.

Obtain the XenServer host-uuid, we need this because we need to specify the XenServer as the host to attach the SR to in the next step.

xe host-list

Create the SR.

xe sr-create content-type=user device-config:device=/dev/<sdx> host-uuid=<host-uuid> name-label=”RAID Array” shared=false type=lvm

You should now be able to see (and use) your RAID array in XenCenter.