I don’t often work with passthrough disks in Hyper-V but, after configuring my Netgear ReadyNAS as an iSCSI target earlier this evening, I wanted to use it as storage for a new virtual machine. Try as I might, I could not get Hyper-V Manager to accept a physical disk as a target, despite having tried both SCSI and IDE disk controllers. Then I read the information text next to the Physical hard disk dropdown in the VM settings:
“If the physical hard disk you want to use is not listed, make sure that the disk is offline. Use Disk Management on the physical computer to manage physical hard disks.”
Doh! a classic case of RTFM… (my excuse is that it’s getting late here). After taking the disk offline I could select it and attach it to the virtual machine.
Ha..well. It doesn’t require to shutdown on ESX when adding new disks to the VMs. It only does when removing a disk from the VMs.
Cheers,
@Kent – it’s the disk that needs to be offline. I believe that Hyper-V R2 also allows the hot-addition (and removal) of storage to/from running VMs (although in this case I was running the original release).
Is there a way to remove a physical disk by a powershell script?
This is because we want to change the usb disk every week for the backup. We already have a part of the powershell script wich shutdown the hyper v machine en will start it.
We couldn’t find how to remove the physical disk.
I don’t know about doing it in PowerShell, but the
diskpart
command should be able to take a disk offline.