Building XenServer Off Host ISO and Backup Storage



  • So following along with the script here I've determined that I now need a place to keep my ISOs, while I'm at it, I might as well build a backup target so I have something to build snapshots too...

    So I'm building another XenServer, with 4 drives in OBR10 (using the above script to get it all together), and will document the process of getting it configured to be a backup target / ISO store.

    The below cutout is useful for knowing what each status icon means in XenCenter.

    resourcestatusicons.png

    So looking in XenCenter I see that I'm way behind on updates. Better find something to do that.....

    Just now patching my server with Xenserver Patcher This is now depreciated, updating can be performed via XenCenter

    wget https://github.com/dalgibbard/citrix_xenserver_patcher/archive/master.zip
    unzip master 
    mv citrix_xenserver_patcher-master patcher
    rm -rf master # To tidy up after our selves and not leave files all over our server
    # just type "y" when asked to confirm removing the zip file
    cd /patcher
    ./patcher.py  # Follow the onscreen guides and let it update your XenServer.


  • I'm at the part of the mdadm raid build where I have to wait. So patience is a virtue. Let's practice that for a bit...



  • As our resident proponent of Virtualizing Everything has said time and again. Everything should be virtual.

    Storing to a disk is just risky in comparison. So with that in mind, we'll be building a CentOS file Server that ideally will act as both an ISO store, as well as a place to backup VM's too.



  • @DustinB3403 Second Server = XenServer, and then 1 x CentOS VM with NFS exports (or CIFS shares) for ISO and backup storage?



  • @dafyre said:

    @DustinB3403 Second Server = XenServer, and then 1 x CentOS VM with NFS exports (or CIFS shares) for ISO and backup storage?

    Exactly.

    If our second server were capable enough it could also be a compute node.

    In my case, it wont be though.



  • So now that our ISO / Backup Server is patched. Which is now available to be patched via XenCenter thank you @Danp (no scripts needed) it's time to make an ISO Store

     df -Th
    

    2015-11-06_09-49-57.png

    We need the 917GB ext3 Device UUID. Which in my case is "799930b1-faf5-576f-b29f-851e67ab02d5". Obviously the capacity and UUID of this drive will vary from system to system. But you're looking for the similar information.

    Yes, we're building a folder out of our RAID10 MD Array. It must be done.

    mkdir -p /var/run/sr-mount/<RAID ARRAY UUID>/ISO_Store
    
    xe sr-create name-label=ISO_Store type=iso device-config:location=/var/run/sr-mount/<RAID ARRAY UUID>/ISO_Store device-config:legacy_mode=true content-type=iso
    

    At this point you should have in XenCenter (see below)

    2015-11-06_08-40-57.png



  • Now we need to put our ISO file onto this Server.

    Download WinSCP add your server details and browse to

    /var/run/sr-mount/<RAID ARRAY UUID>/ISO_Store

    In my case I'm going to use a CentOS minimum ISO, but you can use whatever ISO you want. Found Here

    Once downloaded, from within WinSCP browse to your downloads folder, and drag and drop the file into /var/run/sr-mount/<RAID ARRAY UUID>/ISO_Store



  • Alternatively, you can also use

    wget http://mirror.cs.vt.edu/pub/CentOS/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso 
    

    But make certain that you are in /var/run/sr-mount/<RAID ARRAY UUID> before running the above.

    From directly in the ISO_Store folder.

    User preference I guess. Just change the Hyperlink to whatever ISO you want downloaded.



  • Now that the ISO is on our ISO Server. Time to make a VM.

    • Right click on your server in XenCenter and select "New VM..."
    • Template "CentOS 7",
    • Name it, give it a good description.
    • Select the Installation source, you'll see it in the drop down list
    • Home Server will be the only one there, unless you've pooled your servers
    • Assign CPU and Memory
    • A GPU if you have one, otherwise it'll be blank.
    • Storage assign a large drive. Being this is going to house our Logs and Backup Images you need storage space. This is difficult to give you an answer on "how large" because it completely depends on what your main XenServer(s) have for VM's that need to be protected.
    • Network Interface Card - assign one that's available
    • Finish it, click Create Now
    • Now select the new VM with the yellow icon on it, and click on Console
    • Change the Grub menu from "test..." to "Install CentOS 7"


  • Once the Installation GUI comes up, I'm going to customize my installation. Desktops are nice to look at from time to time.

    It's completely unneeded, but whatever. I want it.

    So customize your installation and select "Server with GUI" else select "File and Print Server" for basic file share functionality in a CLI.

    Select Done.

    Select your partitioning, the basics are fine. Click into and then click done.

    Lastly click "Begin Installation"

    Set your Root password and follow the onscreen guides. Create additional users if you need them. (Which you should. No one should use the root account for everything)



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.