How to remove a local Disk from a XenServer

Open the CLI and do the following:

  1. First we need to find the UUID of the SR to do this use the command:
    xe sr-list
  2. Take note of the UUID and paste it in to notepad.
    Now we need to find the Physical Block Device. To do this use the following command:
    xe pbd-list sr-uuid=your-SR-uuid-from-step-1
  3. We now need to unplug the PBD using the following command:
    xe pbd-unplug uuid=your-PBD-uuid-from-step-2
    Again once you have this paste it into notepad.
  4. We now need to delete the PBD using the following command:
    xe pbd-destroy uuid=your-PBD-uuid-from-step-2
  5. We now need to Delete the association of your SR and the PBD using the following command:
    xe sr-forget uuid=your-SR-uuid-from-step-1
    You will now see that your local SR has gone.
  6. Remove the physical Hard disk


Upload ISO files into XenServer 5.5-6.0

1) SCP the ISO files into the folder called /ISO or any folders that you like
2) symbol link it
#cd /var/opt/xen/iso_import ln -s /opt/xensource/packages/iso/CentOS-5.3-i386-bin-DVD.iso
3) rescan the ISO files order to have it appear under the XenServer Client Console
#xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=isoDone