> # Linking a Virtual Device with a Physical Device

> After creating a virtual device and configuring it as part of a zone, you can define the primary device for it using the link command, which is also used to fail over to the secondary device.

> Note When a link operation fails over to the secondary device, the virtual device is taken offline, and then brought online.

> ## Prerequisites

> As of MDS NX-OS Release 4.1(1a), the following conditions must be considered before linking a device:

> - If you link to the secondary device which is currently active because of failover, the primary tag is moved to the secondary device and the secondary device becomes the primary device.
> - When the secondary device is active, if you link to a third device, and if the fallback attribute was not configured, the third device becomes the primary device but the secondary device continues to be the active device.
> - When the secondary device is active, if you link to a third device, and if the fallback attribute was configured, then the third device becomes the primary device as well as the active device.

> ## Detailed Steps

> To link a virtual target with a physical target, follow these steps:

> 1. Click the Real Devices tab and then click the Create Row icon.
> 2. Select the Virtual Device ID from the pull-down list or enter an existing ID for the virtual target that you are linking with a physical target.
> 3. Select the Real Device ID of the physical target that you are linking with the virtual target.
> 4. Click either the pWWN or deviceAlias radio button, and select the appropriate pWWN or device alias from the pull-down menu. The Name field is automatically populated when you select the pWWN or device alias.
> 5. Click either the primary or secondary radio button for the Map Type.
> 6. Click the CFS icon to save and distribute these changes, or click Close to discard any unsaved changes.

> Copyright 2010-2013, Cisco Systems, Inc. All rights reserved.