Reinitialize Virtual Hard Disk
I have a virtual hard disk (VHD) stored on an external USB drive. The external drive does not have a letter assigned; this is to protect its contents from viral attack. In Hyper-V Manager, I added the VHD to a VM by using the DeviceID of the external drive.
The virtual hard disk successfully appears in disk management of the VM. However, at some point the VHD becomes detached (perhaps due to a backup running on the Hyper-V host) and does not reattach unless I re-add it in the Hyper-V GUI or restart the VM.
Is there a Powershell method to reinitialize the detached VHD? I have tried using "Add-VMHardDiskDrive" but it will not accept the DeviceID in the Path argument. A Powershell command which reattaches the VHD seems better than restarting the VM
every time the backups run.
- New KB articles published for the week ending 10th January, 2021 January 15, 2021
- New KB articles published for the week ending 3rd January,2021 January 7, 2021
- New KB articles published for the week ending 27th December,2020 January 7, 2021
- New KB articles published for the week ending 20th December,2020 January 7, 2021
- New KB articles published for the week ending 13th December,2020 January 7, 2021