In part one of this series, I discussed how to attach an iSCSI logical unit number (LUN) to an ESX server and how to back up virtual machines (VMs) stored on a LUN. Here in part two of our series on VMware Consolidated Backup (VCB), we'll discuss how to configure a Windows 2003 server as a VCB proxy, which can then operate with iSCSI.
The first step is to install VCB. If you have already installed VCB, then you can ignore the next section. VMware features the excellent -- albeit outdated -- Virtual Machine Backup Guide for configuring VCB, which is available on VMware's documentation Web site.
Installing VCB, creating a proxy
Installing VCB is very straightforward. Copy the installation binary to any Windows Server 2003 Standard, Enterprise, or Windows Datacenter Server, click on the installer and follow the prompts in the wizard. Toward the end of the installation process, you will be prompted to accept the installation of a VMware storage driver. Approve the driver install. It is used by the vcbMounter and like commands to read the VMFS-3 LUNs as seen by the Windows 2003 server.
Congratulations, you have just created a VCB proxy server, which acts as a proxy between your backup software and the VMFS-3 LUNs. Hence the term proxy .
Configuring Windows for VCB
Windows will attempt to automatically assign drive letters to each new LUN it detects. (this process is outlined on page 34 of the Virtual Machine Backup Guide), so we need to disable this feature. The first step is to disconnect the VCB proxy from any storage area network (SAN) the VCB sees. This process may require downtime for other services if you are making a VCB proxy do double duty. Open a command line interface and type these commands:
The next step is to reboot the server. After it reboots, we move on to the next set of steps.
Configuring Windows for iSCSI
By default, Windows 2003 does not have an iSCSI initiator, but Microsoft, which recognizes the importance of iSCSI, provides one as a free download. At the time of this writing, the most recent version is 2.05. Download the iSCSI initiator and begin the installation. The installer is straightforward; just follow the prompts from the wizard to the point where it asks which options to install.
The installer will ask if you want to enable multi-support. It is disabled by default, and there is no reason to enable it; VCB does not support multi-pathed LUNs. Allow the wizard to complete the installation. The Microsoft iSCSI Initiator icon should now appear on the desktop as well as in the Start menu.
Now we will provide a step-by-step guide on how to attach an iSCSI LUN to a Windows 2003 server:
- Double-click on the Microsoft iSCSI Initiator desktop icon to open the program.
- Once the program is open, click on the Discovery tab.
- Under the Target Portals section, click the Add button.
- A smaller window will appear. Enter the IP address of the iSCSI server that the LUN is on and that ESX uses and then click OK.
- You should be back to the main program. Click on the Targets tab.
- The LUNs available on the iSCSI server and that you just added should now be listed. Select the LUN that is connected to ESX, and click on the Log On button.
- A smaller window will appear. Check the box next to the text that reads, "Automatically restore this connection when the system boots." If you need to reboot the server, the backups will continue to function. You do not need to check the multipath option. Click the OK button.
- You should now have returned to the main program, and you're done. You have successfully attached an iSCSI LUN to Windows. Click the OK button to close the program.
Verifying that the LUN is attached
In order to verify that the iSCSI LUN is properly attached, we need to open the Windows disk manager. Click on the Start button and click Run. Type "compmgmt.msc," and hit Return. The Windows Computer Management MMC will appear. On the left-hand-side, click Disk Management. When you do so, a wizard dialog box may appear; if so, click Cancel.
The disk manager window should show a new disk of an unknown file system type the same size as the LUN you just added. My disk manager window looks like this:
The disk labeled "Disk2" is my iSCSI LUN. Now it is time to see if VCB can back up VMs on this LUN.
Verifying iSCSI backups work
Just because the process of backing up from an iSCSI LUN is the same as that for a Fibre Channel LUN, any IT admin worth his salt knows that nothing works correctly the first time. If it did, what would the fun be in that? We need to verify that the VCB framework can see the VM. The easiest way to perform this test without affecting an existing VM is to create a new one. The new VM does not even have to have an OS installed; it just needs to exist. I created a VM with only a 100-megabyte hard drive so the backup process will be quick (if it works, that is). It's important to remember that we have to store the new VM on the iSCSI LUN we attached to the ESX server (see part one of this series). This is (or should be) the same LUN that we attached to the VCB proxy server.
Open a command prompt on the VCB server and change directories to the following: "%ProgramFiles%\VMware\VMware Consolidated Backup Framework". Now we need to get the universally unique identifier (UUID) of the VM we just created. Type the following command (replacing all capital words with actual values):
vcbVmName -h VIRTUAL_CENTER_HOST_NAME -u VC_ADMIN_UID -p "VC_ADMIN_PWD" -s name:"DNS_NAME_OF_VM"
This command will spew out lots of information. Look for the lines that resemble the following text:
This text indicates that the UUID of the VM is "500d2bba-447b-79ed-156f-38dcc8ba9deb." Now we can back it up from the VCB proxy. Create a directory to which you will back the VM up. I recommend creating an upper-level directory called "esx-backups" somewhere. I create it at the root of my C drive. Type the following command (replacing all capital words with actual values):
vcbMounter -h VIRTUAL_CENTER_HOST_NAME -u VC_ADMIN_UID -p "VC_ADMINPWD" -t fullvm -r c:\esx-backups\VM_NAME -a uuid:500d2bba-447b-79ed-156f-38dcc8ba9deb
It may take time for the command to complete. When it's finished, open "c:\esx-backups\VM_NAME" in Windows Explorer. You should see a directory listing that includes the VM's configuration file (a file that ends with a VMX extension) and several virtual hard disk files (files that end with a VMDK extension).
If you've gone through this process seamlessly, then congratulations, you have successfully backed up a VM with VCB over iSCSI. If you run into errors, don't hesitate to contact me.
Andrew Kutz is an analyst at Burton Group and a principal consultant at lostcreations. He is also a Microsoft Certified Solution Developer (MCSD), a SANs/GIAC Certified Windows Security Administrator (GCWN) GOLD and a VMware Certified Professional (VCP) for Virtual Infrastructure 3 (VI3). Kutz is the author of the popular open source project Sudo for Windows.