Você está na página 1de 12

How to configure OpenFiler iSCSI Storage for use with VMware ESX.

I wanted to test an Openfiler as a solution forHA and vMotion with ESX Server and vCenter. Using Openfiler is a great way to save some money on expensive SANs and for home lab testing and learning, this choice is just great. I did not have 3 physical boxes (2 for ESX hosts and one for Openfiler) so I opted for a hybrid solution, where Im actually running one ESX server inside of VMware workstation. See the schema below. I was trying to do a step-by-step guide on how-to configure and run a successfull iSCSI connection with ESX Server.

There is box 1: In this box I will run ESX Server. Its a hardware compatible PC with Inte VT compatible Core 2 duo processor and local SATA drive. One NIC network card. 1 Gigabyte of RAM And box 2: Where I will run 2008 Server x64 with 8gigs of RAM and where I run VMware Workstation. Inside of WMware Workstation I will run Openfiler and a Second ESX server. Also there is a VM running 2003 DC as a DNS server. Like this Ill save on one more physical box on which I would otherwise installed the second ESX Server. Ive posted an article before which was based on a whitepaper from Xtravirt, about how-to run ESX Server on VMware Workstation., which is explaining what to do and how to create the ESX VM.

For an Openfiler Ill be using VMware Virtual Appliance that you can download here (x86 VMware Virtual appliance). If you want another version (like x64) or ISO image just go to this url and choose the version you need. Ill be using VMware Workstation to actually run the Openfiler Virtual Machine. I know the performances will not be excellent but to test all this stuff itll be just fine. There is some good documentation about the actual architecture of Openfiler you can have look here.
1.Add Second virtual hard disk to your VM

Before you first start your Openfiler VM, add a second virtual hard disk (as an SCSI hard disk). Like this Openfiler will detect this disk at startup and then youll be able to use this disk for your data.

2. Start Openfiler VM

Then log In remotely via web browser to the ip address which was assigned via DHCP. You will see an image like this. Login with a Openfiler as a login and with password as a password.

3. Then you need to configure Openfiler as a iSCSI target. Whats this? Basicaly that Openfiler will be acting as a server.

First create physical volume. Go to Volumes and click on the link (see image below).

Then create a partition on this volume. Clic on /dev/sdb

You will get onto a page which looks like this one Click on the button Create. (if you are curious you can click to see on the drop down box)

Then Create a Volume Group. Give it some name and click the button Add Volume Group

Then add a volume at Volumes, then Add Volume.

You will then be directed to the page where you can fill the name for your iSCSI volume and also Description. You then must pull the button indicated with the slider bar to the right to specify how big the volume should be. Dont forgot to use the drop down box to select iSCSI as a type of volume.

4. Go to General Tab and edit the properties of the volume.

Just go to general tab and click on Network Setup. Now, fill in the IP adress of Openfiler VM, set the subnet mask, select Share, and then click on the button Update.

5. Go and enable the iSCSI target

To be able to do that you must go to Services and click on a link to enable the iSCSI target.

Thats about it. Next you need to configure vSphere 4 to see the Openfiler NAS and to use this shared storage for your VMotion or High availability tests. You can find the rest of the article here.

How-to connect ESX4, vSphere to Openfiler iSCSI NAS


How-to connect ESX Server to Openfiler iSCSI NAS.

Now that we are in the ESX 4 era we can test it in a lab environement with a iSCSI NAS freeware solution Openfiler. Few months ago I wrote an article about how to configure OpenFiler iSCSI Storage for use with VMware ESX. That blogpost was a step-by-step procedure for a new persons coming to learn stuff about ESX Virtual environments and Openfiler is a great Linux distribution to play with as a storage for ESX Server. In the blogpost youll learn about the Openfiler configuration. Now there is the part when youll need to configure your freshly installed ESX/ESXi 4, 5or vSphere 4 if you like, to reach the shared storage where the Openfiler is. 01.) Fire up the vCenter and go to Inventory > Configuration > Networking and in Networking click on Add Networking. You must add VMkerel to handle features like vMotion and HA.

02.) Use vSwitch0 for the test connection. If you have more than one NIC you can use another vSwitch. I had only one nic in my lab

As you can see there is a warning message saying that its Highly recommended to have separate VMKernel Port group and physical NIC. But nevermind, just go on For your lab its OK.

03.) Check the box Use this port group for Fault Tolerance logging and VMotion.

04.) Set an IP adress for the VMkernel (Just choose a free IP in the same network) and fill the Default Gateway IP adress.

05.) Go to Configuration TAB and click on Storage Adapters.

06.) When you click on Properties, then you open firs the General TAB and enable the software initiator checkbox.

07.) Then click on Dynamic Discovery TAB and add your Openfiler IP adress. In my case 192.168.0.16

08.) Then go to Configuration TAB > Storage > Add Disk/LUN.

09.) Your Openfiler NAS should already appear in the list.

10.) Check the box to maximize capacity of this storage.

11.) And you can browse the Datastore, copy paste files to and from -:)

Have fun -:)

VCPDEV December 31, 2009, 11:11 AM One of the great benefits of working with VMware virtualiztion platform, is the ability to virtualize just about anything, and by that I mean you can even virtualize VMware ESX vSphere 4 in VMware workstation, check out this link below, this has detailed instructions on how to accomplish this. http://xtravirt.com/xd10089 Personally this has been a blessing for me, no longer do I need to have extensive hardware to demo what VMware has to offer, for example my current setup allows me to do demonstrations while I'm travelling to different customer sites, and for training purposes. My setup includes 1. HP Laptop DV7-2185dx Entertainment Notebook This has a Quad core proc at 2.0GHZ per core Comes orginally with 4 GB-RAM upgraded to 8GB Windows Vista 64-bit Has a 500GB Internal HD SATA I have added a dual port PCI-Express e-SATA-11 Card and attached two external eSata Hard drive at 500GB and 1.5 TB, not only that the DV7 Laptop comes with it's own built in e-SATA port, so I have a third hard drive connected at 320GB Now what can you run with a setup like this, well here goes I am running VMware workstation 7, and I am using this to virtualize VMware ESX vSphere 4, with a full Active Directory setup in place, running 1. Virtualized Windows Server 2003, as domain controller with Active Directory 1. Virtualized SQL Server 64-bit to host vCenter server Databases / running on 64-bit Win2k3 2x Virtualized vCenter Server connecting to the database with separate instances for each, and then connecting them with Linked mode / running on Win2k3 64-bit 1 Virtualized Update Manager Server that works in conjunction with vCenter. What this does is allow you to patch any virtual machine and or ESX server. This is running on W2k3 x64-bit 1 Virtualized Linux based Openfiler server, Purpose this virtual machine allows me to create a centralized SAN (Storage Area Network) in my case I am using it as an iSCSI SAN, this allows me to share out any portion of those Hard drive I installed. This is particularly crucial for the setuup to work, because this is what allows the ESX server to have a centralized location to host there virtual machines and to allow the advanced features of vSphere 4, Such as HA, (High Availability) DRS (Distributed Resource Scheduler) VMotion - ( This is what allows you to migrate a running virtual machine from one ESX server to another without any downtime) You can find more info at VMware website http://www.vmware.com/products/vsphere/ So now that I have all this in place the best part is Virtualizing vSphere 4.

One of the other benefits is having all your install software as ISOs, this makes your life a lot easier Think about this now - I then install ESX vSpehre 4 as a virtual Machine inside VMware Workstation 7, and I have a total of 3 ESX vSphere 4 Servers, THese are then connecting to the Openfiler Server iSCSI SAN, to use the same shared storage, now obviously each ESX server has it's own local hard drive, where ESX is installed. Each server is setup in DNS and is using the same domain name, to cut a long story short, configuration too numerous to mention, I then use the virtualized ESX vSphere 4 server to virtualize inside of that 2 Windows Server 2003 and a Windows XP Machine. I can then perform any of the Advanced features within vSpehre 4 Let's recap We have the physical hardware laptop DV7 running Windows Vista Then on top of that I am running VMware Workstaion, then inside of workstation I have several running Windows virtual Mahcines, then I also have 3 Virtualized ESX vSphere 4 servers, and then inside of vSphere 4 sever I am running 2 Windows Server 2003 and a XP machine. I gurantee you that this is one of the bes lab setup I have ever had, for one I dont need to buy 2 - 3 - or 4 physical machine to setup a lab, I can setup and tear down any configuration with lab configuration. I am willing to answer any questions to fill in some of the blank Thanks VCPDEV Certified VCP 3.0 and VCP 4

Você também pode gostar