by andy.whitea at 2013-03-11 09:58:50
Hello again,by JasonHelmick at 2013-03-13 08:23:08
Subsequent to solving my last problem, I have come across another which I am finding it hard to troubleshoot.
I have a differencing disk which, when added to a VM through the settings dialog adds fine and works perfectly when starting up. However, when I try to script the attaching of the disk to a VM, I get an error come up that states no drives are found. Since it is possible to add via the Hyper-V console, I know this not to be true!
I have included the cmdlet and switches I have used to import the disk. Please note that I have checked the file path about 100 times and what is there is a direct copy of its path in file explorer.
Im hoping one of you guys will be able to spot something simple I have missed off!
Set-VMHardDiskDrive -VMName "DEMO-DC01" -ControllerType IDE -ControllerNumber 0 -ControllerLocation 0 -Path "C:\DEMO_Env_v2\DEMO-DC_VHDS\Virtual Hard Disks\DEMO-DC01_Diff.vhdx"
Try using Add-VMHArdDiskDrive