Oracle® Virtual Networking for Windows Hosts Installation and Boot Guide

Exit Print View

Updated: July 2016
 
 

Configure SAN Boot With a Shadow Copy

This procedure describes how to convert an existing server that boots from its local drive to a SAN-booted server. After the server is converted, the server’s local hard drive is not used to boot the server to its OS. In fact, the drive must be completely disabled. No local disks should be available as boot devices when the conversion is complete.

To convert an existing server that locally boots from hard disk to a SAN boot system, you will perform various parts of this procedure on the server and Oracle’s Fabric Interconnect.


Note -  This procedure assumes that one partition is used on one disk.

If multiple partitions are created on the disk, capturing the image is more complex. You will have to modify the tools listed below to capture both the small boot partition where the BootMGR and boot configuration database (BCD) exist as well as capturing the partition where the OS is installed.


For this procedure, assume that the SAN LUN is h:.


Note -  This procedure is written for Windows 2008 R2, but is also valid for Windows 2012. However, you might need to change file names based on the OS type for certain steps.
  1. On the server, install the OS to a local disk in the server.

    Do not attempt to install the OS to the SAN LUN.

  2. Install the host drivers and reboot as required.

    If needed, update the HCA firmware and Option ROM to the correct version for your hardware type. See, Confirm the OS Version.

  3. On the Oracle Fabric Interconnect, add a server for the physical server you plan to SAN boot.
    add server-profile webapps1
  4. Add a VHBA with one LUN to your server profile.

    The LUN should be the appropriate size to contain the OS and applications you intend to install.

    add vhba vh1.webapps1 8/1
  5. Build the server profile to the server by using the set server-profile name connect hostname@director-name:ServerPort command.
    set server-profile webapps1 connect webserver1@Director1:ServerPort18

    Note -  Because the host drivers are already installed (see Step 2), the host is identifiable by the host name, as shown in the example. If you need to find the port on which the server is connected, you can type the show fabric-port command, and scroll to find the connection for the relevant host.
  6. On the server, using Disk Manager, bring the newly added disk online.
  7. Using Disk Manager, format the disk and mark it Active.
  8. Using a text editor, create the backupscript.cmd file.
  9. In the backupscript.cmd file:
    diskshadow.exe /s backupscript.script

    When this script runs, it captures the local disk and places a copy onto the LUN.

  10. Create the backupscript.script file with the following content.
    SET CONTEXT PERSISTENT NOWRITERS
    SET VERBOSE ON
    BEGIN BACKUP
    ADD VOLUME C: ALIAS systemVolumeShadow
    CREATE
    EXPOSE %systemVolumeShadow% p:
    EXEC w2k8_clone_diskshadowImage.cmd
    END BACKUP
  11. Create the w2k8_clone_diskShadowImage.cmd file with the following content.
    imagex.exe /CAPTURE /boot P: c:\SanBoot.wim "Windows Server 2008 R2"
    format.com h: /q /V:Sanboot /y
    bootsect.exe /nt60 h: /force
    imagex.exe /APPLY c:\SanBoot.wim 1 H: /VERIFY
    diskshadow.exe /s removescript.script
    call FixBCD.cmd
    call FixBootSector-2k8.cmd
    call fixregistry.cmd

    Note -  For Windows 2012 R2, use the file name w2k12_clone_diskShadowImage.cmd.
  12. Delete the existing BCD on the SAN LUN.
    delete h:\Boot\BCD
  13. Create a new BCD on the SAN LUN.
    bcdboot.exe c:\Windows /s h:

    This executable creates a new BCD on the LUN and forces the new configuration information into the new BCD.

  14. Create the FixBCD.cmd file with the following content.
    bcdedit.exe -store h:\boot\bcd /set {bootmgr} device boot
    bcdedit.exe -store h:\boot\bcd /set {default} device boot
    bcdedit.exe -store h:\boot\bcd /set {default} osdevice boot

    When this file is executed, it updates the boot database with the new boot partition information.

  15. Create the fixbootsector_W2k8.cmd file with the following content.
    bootsect.exe /nt60 h: /force

    When this file is executed, it places the boot sector on the new LUN.

  16. Create the fixregistery.cmd file with the following content.
    reg.exe load hklm\sanboot h:\windows\system32\config\system
    reg.exe delete hklm\sanboot\mounteddevices /va /f
    reg.exe unload hklm\sanboot

    When this file is executed, it removes any previously assigned drive letters. If the old drive letters are not removed, the system will boot to the h: drive. If the local disk controller had more than just the boot information and the OS, any additional drive letters will have to be reassigned once the server boots to SAN.

  17. Create the removescript.script file with the following content.
    delete shadows exposed p:
  18. On the Oracle Fabric Interconnect, make the server profile SAN Bootable, by setting the san-boot flag for the server profile.

    Use the set server profile name san-boot VHBA WWPN LUN ID command.

    set server-profile webapps1 san-boot vh1.webapps1 11:22:33:44:55:66:77:88 1
  19. Reboot the server and interrupt the POST to enter the BIOS configuration utility.
  20. Remove the local disk from the boot devices list by disabling the on-board storage device.

    If disabling the on-board storage is not preferable, you can remove the physical hard drive(s) from the server, but be aware that some array controllers behave unpredictably if the drives are removed.

  21. Set the HCA high enough in the boot devices list order to enable the Option ROM to complete before another device is considered for booting the server.
  22. Save the settings and exit the BIOS.

    The next time the server boots, it uses the bootable VHBA.

  23. If you are converting multiple servers from local boot to SAN boot, repeat this procedure as needed for each server.

    Note -  The sysprep.exe tool is not supported for this method of SAN Booting Windows Server 2008 R2 or 2012 R2 hosts.