If you want to attach a physical hard disk to a VM (pass-through disk) then the physical disk needs to be offline. You can do this with Disk Management and with PowerShell.
Open Computer Management, and click Disk Management. Select the Hard Disk you want to set offline, right-click and select Offline.
You can now see that the hard disk is offline. You can also see the disk number, which you need if you want to set it offline with PowerShell
Open PowerShell and type:
set-disk -number 0 -isoffline $true
Now you need to attach it to the VM. Just open the settings for the VM and go to IDE Controller 0, select Hard Drive and click Add.
Choose Physical hard disk and select the hard disk you set offline. Click OK. It is easy.
You can add it with PowerShell:
add-vmharddiskdrive -vmname vm2 -controllertype IDE -disknumber 0