Q: How can I change the timeout used for virtual Fibre Channel with Hyper-V?
A: By default, when a virtual machine using virtual Fibre Channel is started, up to 90 seconds is allocated for a LUN to be found connected to the virtual Fibre Channel adapter before the virtual machine startup continues. Likewise, when a virtual machine is live migrated, the same 90-second timeout is used for the LUNs to be connected to on the target Hyper-V server before the migration starts (which is why the virtual Fibre Channel adapter has two sets of World Wide Names—WWNs—one for the current node and one for the target node during a live migration).
I recently had a situation on a new EMC SAN where for some reason 90 seconds wasn't enough and I needed to extend this time. (As it turned out, it was taking 2:10 for the SAN to report back the LUNs and paths for the storage.) This time period is controlled by a registry key on the Hyper-V hosts. To change the time period, follow these steps on both the source and target Hyper-V boxes for live migration:
- Start the registry editor (regedit.exe).
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization.
- Select New, DWORD value from the Edit menu.
- Enter a name of HbaLunTimeout and press Enter.
- Double-click the new value and set it to a value up to 300 seconds (decimal), then click OK. (Any value greater than 300 will just use 300 for the actual timeout.)
The change takes immediate effect. Remember that you can check the event log to see all virtual Fibre Channel-related events under \Applications and Services Logs\Microsoft\Windows\Hyper-V-SynthFC\Admin.
Note that it should typically take no longer than 5 seconds for a LUN discovery via virtual Fibre Channel. This workaround to increase the timeout time is only necessary to troubleshooting a compatibility problem.