Windows Server 2016 – Hyper-V use a physical hard disk to a VM

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.

Disk Management

Open Computer Management, and click Disk Management. Select the Hard Disk you want to set offline, right-click and select Offline.

, <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

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

, <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

 

PowerShell

Open PowerShell and type:

set-disk -number 0 -isoffline $true

, <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

 

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., <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

 

Choose Physical hard disk and select the hard disk you set offline. Click OK. It is easy., <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

You can add it with PowerShell:

add-vmharddiskdrive -vmname vm2 -controllertype IDE -disknumber 0

, <span>Windows Server 2016 – Hyper-V use a physical hard disk to a VM</span>, KandZ

 

 

https://kandz.me/?p=3011

30110cookie-checkWindows Server 2016 – Hyper-V use a physical hard disk to a VMWindows Server 2016 – Hyper-V use a physical hard disk to a VM

Related posts

One Thought to “Windows Server 2016 – Hyper-V use a physical hard disk to a VM

Comments are closed.