Updated post HERE : XenServer 5.6 FP1 add local drive to backup VMs with OpenFiler

BE AWARE !! To follow instructions in this blog post you have to know linux shell and XenServer command line usage. You can wipe data if you don’t understand what you’re trying to do. Try in a TEST environment before making any change in production.

A Citrix KB is available here : http://support.citrix.com/article/CTX121313

Today I had to add two 500Gb SATAu hard drive to my XenServer. Plug this two hot plug drive in this Dell 2950 III was the easy part, configure the new RAID1 in the Perc 6i controller wasn’t so easy… This bios is very annoying and after 2 hours we found the good menu and where to create the new volume…

Once this step done, and after 16Gb of memory more, XenServer started without any problem, the drive wasn’t available through the XenCenter so I though I had to mount it or something like that.

So here comes the few steps to add a local storage to your XenServer 5.5 :

Type : fdisk -l

you’ll see the list of all volumes and hard drives, then :

Type : pvcreate /dev/sdb

sdb is my new volume

and then to configure it as a local storage :

Type : xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”LOCAL SR”

scsi-SATA_ST3320620AS_5QF7QZZL is the name of my volume, you’ll have to change this value with your own, and name-label is the name you want to give to your local storage.

and this is it !

Remark : If your XenServer is a pool, you need to put it off, follow above steps and put back the XenServer in your pool.

88 542

  • Ronald

    Hi Stephane, thanks for your guide on adding a local SR, it really helped.

    I was wondering if you might part with another piece of wisdom.

    I 2 SR’s on my XenHost, SR1 & SR2.

    I previously converted a linux VM into a template and it lives on SR1. When I deploy a VM from the template the new VM is always created on SR1 even though in the “xe vm-install” command i specify the sr-uuid option. Any ideas ?

    Regards

    Ronald

  • Hi Ronald, I’m glad this news helps a bit !
    And about your problem, I have a VM converted into a template, I just tried to make a VM from this template with XenCenter 5.5 and I can choose the SR where I want it to be created.
    Which version of XenServer do you use ?

  • Ronald

    🙂 Thanks Stephane.

    I’m using XenServer 5 Update 3.

    My custom template lives on SR1 and when i issue the below command on the CLI:

    “xe vm-install template=MYTEMPLATE sr-uuid=SR2-UUID new-name-label=MY-NEW-VM”

    or

    “xe vm-install template=MYTEMPLATE sr-name-label=SR2 new-name-label=MY-NEW-VM”

    even though specifying SR2, the VM is always created in SR1.

    It’s only via the CLI though, using XenCenter if i click through the wizard, i can specify the SR and it works. But just not via the CLI.. so it has me a bit baffled 🙂

    Regards

    Ronald

  • Ok, I give a try tonight with the CLI to check if I have the same behave on XenServer 5.5 and I’ll let you know.

  • Ronald

    Thanks Stephane, really appreciate it 🙂

  • So, I have the same behave with XenServer 5.5 Beta1. As far as I read and what you were able to read too, this is a built in behave.
    So to continue to use the CLI and be able to go until the end of what you want to do, you have to copy the VM and then destroy the one on SR1.
    3 command lines instead of one :

    xe vm-install template=MY Template sr-uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx new-name-label=NEWVM

    xe vm-copy vm=NEWVM sr-uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx new-name-label=COPYNEWVM

    xe vm-destroy vm=NEWVM uuid=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy

    I believe this is to use with some kind of automation.

    That’s it, sorry I don’t think I bring a big help on that one 😉

  • Ronald

    Sweet, thanks Stephane, really appreciate it, it means i’m not loosing my sanity. I wonder though if it’s not a bug. Being able to point the install to a different storage repository which uses seperate disks will speed up deployment time. i’ll keep digging and if i get anywhere i’ll be sure to drop you a line 🙂

    Thanks for all your help

    rH

  • I will reach Citrix XenServer contact I have in France to ask if they’re aware of this “behave”

  • Florian

    Hi Stephane,

    thanks for your Guide, its the only thing i found regarding one problem i have with Citrix Xen, maybe u could help me. In Citrix Forums noone has answered my Question.

    I wanted to migrate my private ftp/smb-server to a vm. It didn’t work automatically, so i did a clean install, but thats another story. Now i have my fresh install of CentOS 5.2 as domU on my Citrix XenServer 5.0 Update3.

    I plugged in the whole bunch of sata-hdds (no raid, no lvm, just “normal” ext3 formatted hdds. I wanted to mount these hdds in my domU, but i just don’t get it. I have set up one test-drive to not lose any data. If i follow your guide, i can add (in XenCenter) another virtual disk to my domU (which will be unformatted). I would really apreciate it, if u could help me how to mount these hdds in my domU.

    Thanks in advance,
    Florian

  • Florian

    ok, just if anyone else stumples upon this, it seems that there is no such possibility in Citrix XenServer:

    http://forums.citrix.com/thread.jspa?threadID=152138

    So goodbye Citrix, i dont have enough money to buy a NAS… or another server.

  • Hi Florian,

    To resume, you want to add a local hard drive to your XenServer and use it only as a hard drive from a VM, this new hard drive won’t be use by XenServer to host VMs right ?

    Apparently, and the post from Citrix forum you posted explain this feature isn’t possible with XenServer (yet)

    You should answer the post on the Citrix forum to explain your request and explain also this feature is available with VMWare.

    I will give a try to check what can be done, maybe there is a trick

  • Florian

    yeah, thats right … i answered the post mentioned above, but no reactions till now.

  • Can you suggest a way to do P2V (physical to virtual) migration to citrix xenserver?

  • Hi !

    If you want to convert a server from physical to virtual you have the choice between two solutions :
    Boot the server with the XenSer install CD and choose the p2v option in the menu and follow the steps or go to your mycitrix website ( https://www.citrix.com/English/ss/downloads/details.asp?downloadId=1855017&productId=683148 ) and Download XenConverter 2.01 and then install it on the target server.
    With this latest solution you’ll notice you have many choices, you can export the server to vhd, xva etc… and directly to your XenServer.
    If you need more information like a short video guide, just ask I can make one.

  • Gordon

    scsi-SATA_ST3320620AS_5QF7QZZL is the name of my volume

    how to get this name?

    pvcreate /dev/sdb I use the pvcreate /dev/sda3 that is last volumn list by fdisk -l

  • Hi Gordon,
    You can find name of your volume with this command line :
    ll /dev/disk/by-uuid/

    I think this is what you’re looking for.

  • D.Ray

    Awesome site, very helpful so far!

    Just wanted to add some more information for Gordon, re: how to get the volume name.

    type: ls -l /dev/disk/by-uuid

  • D.Ray

    To follow up to my previous post, to use my above tip you need to change the …”/dev/disk/by-id/” to “/dev/disk/by-uuid/”

    For example, on my system, the string would be:

    xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-uuid/8fe5e548-5a84-4762-84ac-fb396d48309d name-label=”LACIE SR”

  • If I have existing Xenserver install and VMs on a RAID array and i want to use this array and data on a new fresh clean install of Xenserver do the above commands to add the disks in as local storage wipe the disks, to summarise can I get the VMs from 1 xenserver install into another easily

  • JeffA

    When I type: “ls-l /dev/disk/by-uuid/” sdb1 does not show up. However, when I type: fdisk-1 it looks like this:

    Device Boot Start End Blocks Id
    /dev/sdb1 1 241369 1938796461 83 Linux

    “ls-l /dev/disk/by-uuid/” shows this:

    total 0
    lrwxrwxrwx 1 root root 10 Aug 20 01:16 33891d44-a7a8-41f4-b319-9edd46cea916 -> ../../sda7
    lrwxrwxrwx 1 root root 10 Aug 20 01:16 475c38a1-d864-42b9-a2cd-68858f19bded -> ../../sda5
    lrwxrwxrwx 1 root root 10 Aug 20 01:16 4A8C-9DD6 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Aug 20 01:16 5ca0dc7c-6880-457a-82be-0b7462838e36 -> ../../sda6

    Where am I going wrong?

    Where am I going wrong?

  • JeffA

    If you want to check all your hard drives you can use the following command :
    ls -l /dev/disk/by-disk/

  • JeffA

    Stephane

    Thank you… Actually, that command did not work. It said “No such file or directory” However, I issued the following command:

    ls -l /dev/disk/by-id/

    This allowed me to get the uuid. After that I followed your instructions given in your article and now all is working great. Thank you for the help.

  • Carlos

    Hi there!

    Is there a way to import a .VHD file to a local storage in Citrix Xen Server v5.5?

    I mean manually import it via CLI from a shared folder?

    Thanks in advance…

  • Koko

    Hi, please help me out..
    I had follow the instruction.
    Type : fdisk -l
    Type : pvcreate /dev/hdb1
    hdb1 is my new volume > i’m using 120Gb ATA.
    Type : xe sr-create type=lvm content-type=user device-config:device=/dev/hdb name-label=”LOCAL SR”, same as Gordon case > I don’t know how to get this name: “scsi-SATA_ST3320620AS_5QF7QZZL” ?

    Then the LVM has created but can’t be used (problem).
    How to delete/ solve this problem?

    FYI because of the problem above, I can’t see my ATA disk with command “fdisk -l”

  • B

    I am running due diligence testing, and wanted to present a total system failure.
    My configuration is a Proliant DL380G6 with 32GB RAM Quad Quad Core.
    I set a Raid 1 Mirror on 2 300GB drives, I used the smart start to create the first partition at 100GB, then created a second mirror on the same set of drives so that I could utilize the wasted 200GB for Crash Dump And SR suspend Dump. This is also useful for backups of the Metadata.
    I then set up a Raid 5, 6 x 300GB which came out to roughly 1.1TB. I created a 2003 64 Enterprise server and completed DC promo.
    So the long and short of it I wanted to understand a full recovery so I whacked the mirror set both Raid 1 sets simulating a total head replacement. There was no recovery information stored on the Raid 5 but the data and VHD was still present in the raid 5 set. But of course XenServer wanted to format my raid 5 during the install process. I told it no rebuilt the mirror set and then went through a major Hassel to get XEN to see the storage, I finally came across this site and wanted you and everyone to know that command you provided is a destructive command, it wiped clean the 1.1 TB of data.
    Citrix needs to address this issue with some sort of Admin tool that will not cause data loss and pissing their customers off.

    The commands below wiped the data off the Raid 5 set.
    Type : pvcreate /dev/sdb
    sdb is my new volume
    and then to configure it as a local storage :
    Type : xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”LOCAL SR”

  • Hi B,

    You have to know, using command line is for advanced users / admins and people who knows what this command is doing. If you just copy and paste command lines as you find it, you will have trouble… sdb is a drive, you can have sda, sdc, sdd etc etc…
    This command line works in my case (and most of the “light” cases) but you have to change it to stick to your XenServer configuration.

    Regards,

  • Dejan MARKOVIC

    Hi guys,

    for those who are looking for a more explanations concerning LVM usage, take a look at here:

    http://wiki.archlinux.org/index.php/LVM

    and of course the official wiki:

    http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29

  • Brian

    OK, followed your advised, several issues here. My complete lack of knowledge of Linux.

    your advised should be taked with caveats, LARGE RED FONT WARNING this will DESTROY all partitions and data contained on the target volume.

    Seylavee we live we learn. I had my XEN Server setup in a Raid 1+0 boot partition and 1.1 TB of data and VMS on Raid 5. Since this is DEV I wanted to break it and attempt recovery. I destroyed the mirror set, very realistic scenario.
    I rebuilt the mirror set 100GB for XenServer and created a second mirror on the same disks to utilize the additional 200GB of disk space for Dump, suspend and logs.
    I knew the data was still present on the Raid5 as I verified it through Ubuntu. I started the XenServer install, I told it to use the 2nd partition of the Raid1+0 mirror as it stated it would wipe clean any data on the installation and local storage volumes.
    After completing the installation the Rad5 Volume was not present, again I verified the Raid and data was intact.
    After many hours of research I came across your site, I thought I was just loading /mounting the drives so that the OS could see the storage, however I was wrong the commands listed did mount the volume and it also wiped all of the data off the RAID5 set.
    I think you should post a very large warning sign, I would hate to see this happen to someone in production.
    If you could please write a procedure to recover in my scenario, I think it would benefit the masses.
    The entire process should have taken about 5 minutes and it turned into 10 hours of research and reloading.

    Thanks for your help

  • Ok Brian, I’ve made a change at the top of this blog entry BUT :
    – Since this post was release (may) you’re the first to complain
    – You really have to understant when you’re typing something in Xe cli
    – You never have to make a change straight on Production environment.

  • Brian

    Right this was a dev box, I am new to Linux but not a total newbie. I am cross certified as a MCSE+I, CNE, and Citrix Certified Engineer and well too many to mention, I have been in the business for twenty ++ years, I would never attempt anything like this in production. I truly ignored Linux as I never had the need for it. Well this is the life of an IT guy never static. SO really I lost nothing but gained experience.

    We are in the testing phase of XenServers, XenApp and VDI. For the Virtual world Linux would be king as the host, demands little resources and for the most part rock solid. Just harder to work with unless you have a tremendous amount of experience with the CLI. Books, blogs, and white papers just don’t cut it.

    I really would like to see a break fix posted for the scenario I mentioned. I think this would be useful for me and others.

    I did search for quite a bit and was not able to come up with a solid answer for mounting an existing Raid or local storage that has populated data. It appears Citrix does not have a tool for this. The Citrix console and GUI are useless in this task, I hope I am not the first to be asking what happens if I lose a Raid set or blow out a back plane, and need to swap heads.

    Anyway thanks for the help I look forward to seeing the answer for the break fix on the site soon. If I come up with it I will send it over in the blog. Time to hit the books again Aug…

  • I already saw what you request on Citrix’s forums, but never get any clear answer from Citrix, I’ll try to find you some tips.

  • Cristiano

    Hello guys!

    Thanks for the guide ArchY, and thanks for the tips with some commands D.Ray. You helped me a lot!

    😉

    Att.
    ___________________
    Cristiano Santos
    Brazil – Sao Paulo

  • You’re welcome Cristiano !

  • Thanks Stephane – worked a treat!

  • Rob_S

    1st of all, thank you so so much for all your help with the above mentioned topics.

    Thanks to you, i’ve managed to get my 2nd partition up and running as a Storage Repository!

    My only question now is as follows:

    Is it possible to move / remove snapshot data from my original SR and put it onto my new much larger SR?

    Also, can the snapshot / VM data be removed completely? The reason I ask is that although I have deleted snapshots from the 1st SR, it is still showing as full so I’m assuming that the data is still there.

    Thanks in advance

    Rob_S

  • Hi Rob,

    I was aware of this “bug” and I found this enormous thread @ Citrix’s forums : http://forums.citrix.com/thread.jspa?threadID=249121&start=0&tstart=0

    This is amazing but this issue is still not resolve… and the only way seems to export your VM using xva format, double check your export integrity and then delete everything on the XenServer to finally import your xva file… this is crazy… Maybe I should try to have a closer look to this one…

  • Joe Shonk

    A couple of things….

    I had to use fdisk to create the partition first, then run the pvcreate command.

    Second, using the disk-id did not work. I had to use the device path itself (device-config:device=/dev/cciss/c0d1p1) in order for XS 5.5 to recognize the new volume.

  • Hi Joe,

    I just had the oportunity to try again and I can find my disk using disk-id, I first had to delete all paritition with fdisk command and everything went very smoothly.

  • Mic

    I am fairly new to XenServer and I am wondering if you can add a new drive/volume to an existing vm. I need a server with at least 2 different drives to separate the application from the os.

    Thanks
    Mic

  • Hi Mic,

    Yes you can ! 🙂

    You can as much vdisk as you want to an existing VM, I suppose there is a limit but this is more than one 🙂

  • Mic

    Are you able to do it from the XenCenter console or must it done from the cli on the XenServer?

  • You can create a virtual disk and assign it with Xencenter console

  • Mic

    Thank you so much. I will give it a try once I build the server.

  • Stefan

    Thank you!

    …but this is not possible when the xenserver is member of a pool. Than you have to remove it from pool, attach the storage and reconnect it to the pool…

    Regards!

  • Mic

    It worked. It was very easy. I do believe I was overthinking the process.

    Thanks again.

  • Mic

    This may not be the correct forum for this question, so if it is not please direct me to the correct place.
    I am trying to create a vm from a template, but I keep getting this error – “The specified storage repository had insufficient space.” This cannot be as the repository has 330GB free and I am trying to create a 50GB vm. Has anybody seen this before?

    Thanks
    Mic

  • Hi again MIC, this is not the right place to ask this question because this thread is not about this problem, but you can write your question in here : http://www.archy.net/forum/
    I search a bit to prepare you my answer 😉

  • Pietro

    Hi,

    My configuration is a Dell PowerEdge R410 with 8GB RAM 2 CPU Quad Core, 2 sata disk 160GB Raid 1 and 2 sata disk 500GB Raid 1.
    I’ve installed Xenserver on first virtual drive 160GB /dev/sda and i have Local storage on a second virtual drive 500GB /dev/sdb.
    Is it possible and how save files and data, of a virtual machine (Win. 2003 server R2), outside a VM so files can be read like their are in a shared folder.

    Thanks in advance.

  • schtebo

    thx!!

    your post is “gold” 🙂

  • Pingback: Cloning a Xen Server?()

  • thx Schtebo ! 🙂

  • Anand kumar

    Thanks. 🙂

  • ac4000

    Thanks.

  • Jay

    I have a 4 disk configured in raid 5 (hardware raid). How can I know the volume name (scsi-SATA_ST3320620AS_5QF7QZZL in your article)?

    I’m reading XE command manual now, but still can’t find the right command to use.

  • Jay

    I just saw “Older comments” link and say “dooh!”

    I found my raid drive at /dev/cciss/c0d0

    Thanks, great tutorial!

  • jairus

    hi,Stephane. i need your help so much and it confused me almost two days.

    I have another harddisk with raid 1 to add to the xenserver.after pvcreate /dev/sdb, it couldn’t be sr-created sucessfully

    [root@xenserver-dxvoqzrt ~]# ll /dev/disk/by-id/
    lrwxrwxrwx 1 root root 9 May 18 19:10 scsi-3600508e00000000075badb6461956405 -> ../../sdb

    [root@xenserver-dxvoqzrt ~]# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-3600508e00000000075badb6461956405 name-label=’LOCAL SR’
    Error code: SR_BACKEND_FAILURE_19
    Error parameters: , No such device [opterr=Device /dev/disk/by-id/scsi-3600508e00000000075badb6461956405 does not exist],

  • Hi Jairus,

    What is you raid controller ? I bet XenServer doesn’t see your raid configuration because no drivers are associated.

    Regards,

  • jairus

    Thanks for your reply. The drive is avariable. My server is Dell R410

    [root@xenserver-dxvoqzrt ~]# fdisk -l /dev/sdb

    Disk /dev/sdb: 146.1 GB, 146163105792 bytes
    255 heads, 63 sectors/track, 17769 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/sdb doesn’t contain a valid partition table

  • Jairus :
    try this command and past the output here :
    sg_map -x
    and
    pvs
    then
    vgs

    Cya

  • jairus

    [root@xenserver-hhmkdkmr ~]# sg_map -x
    /dev/sg0 0 0 0 0 0
    /dev/sg1 0 0 1 0 0
    /dev/sg2 0 0 2 0 0
    /dev/sg3 0 0 3 0 0
    /dev/sg4 0 1 0 0 0 /dev/sda
    /dev/sg5 0 1 2 0 0 /dev/sdb
    /dev/sg6 3 0 0 0 5 /dev/scd0
    [root@xenserver-hhmkdkmr ~]# pvs
    PV VG Fmt Attr PSize PFree
    /dev/sda3 VG_XenStorage-e5a7dd4b-7679-f14b-dc04-f4f6d85971c3 lvm2 a- 128.46G 128.46G
    /dev/sdb lvm2 — 136.12G 136.12G
    [root@xenserver-hhmkdkmr ~]# vgs
    VG #PV #LV #SN Attr VSize VFree
    VG_XenStorage-e5a7dd4b-7679-f14b-dc04-f4f6d85971c3 1 1 0 wz–n- 128.46G 128.46G

  • Ok,
    I think your XenServer is in a pool, remove it from tehre, add your storage and put your XenServer back in the pool.

  • jairus

    stephane,thank you so much,it works! You are great.

  • Good !

    Cheers

  • Manuel

    Dear Stephane,
    i have one problem:
    I want to add a SSD with following command:

    xe sr-create type=lvm content-type=user device-config:device=dev/disk/by-uuid/ohnuu0-4eP3-pj0j-JXs0-xhzf-aDMu-x19pw6 name-label=”SSD”

    But then I get the error

    Error code: SR_BACKEND_FAILURE_91
    Error parameters: , The device is not a valid path [opterr=path is dev/disk/by-uuid/ohnuu0-4eP3-pj0j-JXs0-xhzf-aDMu-x19pw6],

    how can i fix it?
    Hope to hear you soon

    Regards
    Manuel

  • Manuel

    Because of the missing edit-function:
    XenServer 5.6, Console running via XenCenter 5.6
    30GB Memory
    4x 147 GB SAS HardDrives (RAID5)
    1x 32 GB SSD (want to add to the local storage)

  • Hi Manuel,

    Did you try the commands mention just before you post ?
    past the output here :
    sg_map -x
    and
    pvs
    then
    vgs

  • Hi,

    Thanks for this useful post.
    This post works for Citrix XenCenter 5.6 too.

    Regards
    Silvan

  • Socrates

    Note, you need not remove the host from the pool if you use host-uuid in your sr-create command:

    xe sr-create host-uuid= type=lvm content-type=user device-config:device= name-label=”Local storage”

    P.S. Using /dev/disk/by-id/ failed, while using /dev/disk/by-path/ worked in my case.

  • Socrates

    Add: some chars got stripped in my comment, host-uuid needs the uuid, and device needs the device ofcourse

  • Klodovik

    Hi,
    i have similar problem but i wasn’t able to find a solutions, maybe you could help me.

    I have few XenServers in resource pool and two iscsi storages with multipath attached on all servers. iSCSI is started and from Linux/XenServer point of view it can see both LUNs from both storages. I want to add both LUNs into one LVM VG and I want to tell XenServer when creates LV put Logical extents on both phisical volumes (I want to tune lvcreate options).

    all the time all servers has to stay in the resource pool and they all has to see new LVM file storage

    Do You know how to do this?
    Also, do you have an idea how to tune lvcreate options for VM storage creation?

    Kind regards,
    Klodovik

  • Hi Klodovik,

    I could say I have a solution, but I cannot test this issue in my lab.

    Maybe someone else will be able to bring some help. Did you try Citrix forums ?

    Cheers,

    Stephane

  • Klodovik

    Hi!

    Yes, I tried citrix forum as well but no one replied.

    Can you share ideas, I will test them on system directly, it is not in production yet so I can experiment, and I will give you feedback.

    Kind regards,
    Klodovik

  • chris

    if i have sda3 available, how to make it into two drive and store one as iso, another as local storage?

  • Pingback: Luiz (fl0cker) Blog » Adicionando um novo disco ao XenServer()

  • I would not follow this procedure. The statement regarding pool and needing to leave and rejoin is not accurate, and the pvcreate command is not required.

    http://support.citrix.com/article/CTX121313

    I followed this process over 10 times, without a glitch… I went looking for the KB via google because it is easier, but this page came up first.

  • Hi Matt,

    You’re totally right, you MUST prefer official KB from Citrix than the one I made.

    BUT, if you’re looking date, this blog have been written in May 2009 and Citrix KB have been created On: Jul 28, 2009 and updated On: Jul 20, 2010

    So when I wrote that it was valid and it worked well as you might read along all the comments here.

    But you’re right, you must follow Citrix KB prior this blog 🙂

    Thanks to point this out, I modify the blog by adding this link

    Cheers,

    Stephane

  • M.J

    Hello,

    first of all thank you for the useful guide, please i need your help on this i’m new to using xen and linux.

    what i’m trying here is that i want to add a new hard disk to my server which is running xen as a hypervisor it has 3 virtual machines one of them is the domain controller, what i’m worried about here is that after the upgrade will the virtual machines bs able to start normally (i’m sorry if i’m being totally ignorant )

    i would really appreciate you help i’m really new to this and afraid that if i did the upgrade i would lose data and i can’t afford this to happen..

    again appreciate your help

  • Hi MJ,

    I would say if you really want to be sure to not lose your existing VMs, you need to back it up. You can do it through XenCenter.

    Cheers,

    Stephane

  • M.J

    Hi again,

    thank you for helping me out.

    i need to ask you one more thing if i shut down all the virtual machines properly then shut down the xenserver, upgraded the hard disks then started the physical server went to the xsconsole and from disks and storage repositories tried to configure the new harddisk will that work and what will happen to the old virtual machines (i read something about the uuid for each virtual machine do i need to change those), i’m worried here because previously i upgraded the RAMs and after i rebooted the xenserver the domain controller did not function and we couldn’t find anything wrong with it and we had to revert to a snapshot and that’s what is making me really worried here

    again sorry i’m being totally ignorant here but as i told you before i’m new to the administration world

    thank you again i truly appreciate your help

  • Don’t worry about asking questions, community and exchange is the main purpose of this blog.
    Before doing anything, you need to BACKUP you VMs, and before everything, you need to try to restore one to make everything works properly.
    Then you can proceed to your new hard drive/disk integration.

    Cheers,

    Stephane

  • Roel Niesen

    Hi,

    If you add a SR local to a server that is a member of a pool, you must add the host-uuid when you excecute the xe sr-create command.
    xe hsot-info gives you the relation machine name and uuid.

    This was the solution for me.

  • Hi Roel,

    Thanks for the tip !

    Cheers,

    Stephane

  • M.J

    Hi I know that this is unrelated to this post but can you please tell me if there is a way to connect to a virtual machine to Citrix from the physical box

    I am unable to connect to the virtual machine because of a network issue and the DC and DNS are VMs on the machine is there a way to connect to it other than xencenter as i need to troubleshoot what is the issue

    I would truly appreciate your help

    Thank you

  • Hi MJ,

    I don’t really understand what you mean by connecting the VM in another way than with XenCenter.
    If you have network issue, the only way you can access your VM is through XenCenter to open the console and check what’s wrong withing Windows.
    You don’t need DNS and AD to connection with XenCenter on your XenServer, you just need a computer with XenCenter, then you can connect to your XenServer using its IP address and you can check whatever what’s wrong.
    If you have network issue on your XenServer, there is no other way to troubleshot than to log into the console of the box.

    I hope it answers some of your questions

    Stephane

  • GICOS

    Hi I got this code, help me pls to initealize a local Storage

  • John

    Thanks for the post Stephane – I tried this on my XS602 install with 3 drives installed. pvcreate doesn’t seem to work, I get the message: Disk /dev/sdb doesn’t contain a valid partition table
    [root@xenserver2 ~]# pvcreate /dev/sdc
    Can’t initialize physical volume “/dev/sdc” of volume group “XSLocalEXT-29890e16-ae87-bf5e-56e3-176f5befea8e” without -ff

    This happens with each blank volume I want to use /dev/sdc and /dev/sdb

    Thoughts?

  • Hi John,

    You should use fdisk to prepare your drives, something like :
    # fdisk /dev/sdb
    a (for add)
    1 (partition number)
    then let it cover the entire disk, simply accept default start & end.
    w (write and exit)

    Let me know if it works, I didn’t tested this blog with XenServer 6.x

    Stephane