Search This Blog

Friday, May 10, 2013

Configuring a XenServer 6/FreeNAS 8.2.0 Environment

These 2 versions of software - XenServer 6 on a whitebox PC and FreeNAS on an old Dell Poweredge 860 present some interesting configuration issue.
My goal was to configure a test environment before making changes to a production system and verify:

  • Configuring an intial system - with the XenServer and Centos 5.8 guest to access the NAS.
  • The process of adding Network Adaptors to the XenServer.
  • Configuring a storage local area network for the XenServer(s) to access the NAS.
  • Moving the NAS from the management network (Network 0) to the storage network.
  • Ensuring the guest VMs are still operational and can access their data.

XenServer 6.0 Installation and VM Configuration.

This was a straightforward installation. the XenServer was given a fixed IP. Version 6.0 build 50762p was installed.
 Creation of the VMs - with Centos 5.8 required using the generic "Other install media" templates. Using either the Centos or RedHat EL templates caused various errors - either at install - no mass storage devices found, or after install and errors like:
 File "/usr/bin/pygrub", line 808, in ?, fs = fsimage.open(file, part_offs[0], bootfsoptions), IOError: [Errno 95] Operation not supported

Once the generic template was used the VM could be installed and created as expected.


FreeNas 8.6.2 Installation on Dell PowerEdge 860.

FreeNas has the requirement that the drive the OS is installed on cannot be used for sharing, the installer reccomends use of a flash drive for the OS.
To add an boot of a flash drive, you need to modify the BIOS configuration for the 860, specifically:
1) Change the USB Flash Drive Emulation Type to "Hard Disk"
2) Change the order of the Hard Disk drive Sequence to make sure the USB drive is first.
The blog post at SysAdmin Notes is very  helpful.
I enabled SATA drives - rather than the PERC controller so FreeNas could access the drives.
I then followed the Quick Start Guide

  • set admin and root account password.
  • configure the network interface, by default the system will boot using DHCP on the first interface.
  • enabled display of console messages in footer.
  • created a volume on the SATA drive  (/mnt/ada0).
  • created a zfs volume (ada01) with in the ada0 volume 
  • manually create a user account (as opposed to using LDAP or Active Directory).
  • perform ISCSI configuration (see below).

ISCSI Configuration.

I did these steps:
  • Enabled the iSCSI service - under services.
  • Created a iSCSI authorized access. If using the Microsoft iSCSI initiator, the CHAP password should be between 12 and 16 characters long I would make it 12 characters long.
  • Created device extent on ada01
  • Create an initiator - set of systems allowed to connect, as per the quick start - ALL addresses and connect to ALL intitiators.
  • Specify portal - IP address and port to be used for iSCSI connections.
  • Check the Target Global Configuration - set Enable LUC to on, and Controller Auth Method to None, ensure Controller IP Address and Controller Network are the defaults. This will let you dynamically add/remove targets without having to restart the iSCSI service.
  • Create a target. Specify the name, alias Portal Group ID, Initiator Group ID, Auth Method and Authentication Group number. I set the Auth Method to CHAP. For a new system where will only be one Portal Group, Initiator Group and Authentication group.
  • Associated the Target with an extent. Select the Target and Extents created above - for a new system there will be only one selection.


No comments:

Post a Comment