How to add additional hard disk in xenserver

To add additional hard disk in xenserver

When a new internal hard drive is installed on a XenServer to work as a new local storage repository, it is not immediately available to the XenServer Console. This article describes how to add an additional hard drive in XenServer.


To Install a hard drive on a XenServer

At first, Switch On the Xenserver

Open Xencenter tool and connect to Xenserver.

Check the available hard disk in Storage section.

Here, local storage is my default storage. Select “ console” in xencenter-server menu tab.

Press enter to login into Xenserver

Run the following command to display the installed disks.

[root@xenSR-linuxhelp ~]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn' t contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on ' /dev/sdb' ! The util fdisk doesn' t support GPT. Use GNU Parted.

Disk /dev/sdb: 42.9 GB, 42949672960 bytes
256 heads, 63 sectors/track, 5201 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        5202    41943039+  ee  EFI GPT

/dev/sdb1” is my default hard disk. Here my Xenserver take new hard disk as “ /dev/sda



To check host uuid

[root@xenSR-linuxhelp ~]# xe host-list
uuid ( RO)                : 1b2265f8-06fb-4980-8415-371e627efefb
          name-label ( RW): xenSR-linuxhelp
    name-description ( RW): Default install of XenServer

Run the following command from the command line interface.

[root@xenSR-linuxhelp ~]# xe sr-create content-type=user device-config:device=/dev/sda host-uuid=1b2265f8-06fb-4980-8415-371e627efefb name-label=" local-storage2"  shared=false type=ext
4226d65a-e2cf-f7aa-9f30-d828df5b6879

Now, the installed hard drive is visible in the XenServer Console.


Click “ storage” in menu option and check the new hardisk.

Here “ local-storage2” is successfully added.

FAQ
Q
By making UnRaid a VM does it still allow the ability just to drop the bzroot and bzimage files when upgrades are released?
A
yes it does, but you will need to remember to drop the files onto VHD as well as on the USB stick the issue is that Hyper-visors do not support booting VM from USB sticks so you need a VHD
Q
Are the onboard SATA ports of the motherboard left for XenServer operation, and the UnRaid hard drives all placed on Expansion cards placed on the pcie? 
A
this is usually the case for VM setup. the reason being that you would want UnRaid full control of drive controller and HDD attached to it
Q
If its possible to add the virtual hard disk for xen server?
A
Yes
Q
How can I check it out the host UUID?
A
Please run the following command as "xe host-list"
Q
Whether it possible for share the Disk from Virtual machine to another Virtual machine?
A
Yes