0

So I have implemented the following snippet

$mountVHD = Mount-VHD -Path $vhdPath -ComputerName $hostName -Passthru
$VHDInfo = Get-VHD -Path $vhdPath -ComputerName $hostName
$VHDInitialization = Initialize-Disk 7 -PartitionStyle MBR

Everytime I execute Initialize-Disk, I return an error as following

Initialize-Disk : Unspecified Error
Extended information: The device is not ready.
At line:1 char:1
+ Initialize-Disk 7
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified:    (StorageWMI:ROOT/Microsoft/Windows/Storage/MSFT_Disk) [Initialize-Disk], CimException
+ FullyQualifiedErrorId : StorageWMI 2,Initialize-Disk

When I manually try to Attach VHD, Initialize the disk, etc, I get the same error, "The Device is not ready."

Is this something to do with utilizing a dynamic vs static VHD. I can't seem to find any answers to this issue. I even tried the following

Trying to create. initialize, and format VHD disks

Community
  • 1
  • 1
cameracode
  • 97
  • 1
  • 10
  • I'm not trying to create a VM, I'm actually just using the VHD as a container to upload to an Azure Storage storage blob. – cameracode Aug 30 '16 at 04:38
  • OK, I'm doing some checking for common causes of this - Try echoing $vhdPath to console to confirm path is correct. Check the permissions tab of the folder it is in and make sure you have full control. If you have differential VHDs setup, this utility makes sure the parent link is not broken. https://olafd.wordpress.com/2008/10/12/vhd-inspector-v1-0-get-information-from-virtual-pcs-vhd-files/ – Randy Schuman Aug 30 '16 at 05:18
  • This is the only difference I could find. VHDX (Hyper-V Virtual Hard Disk) - Supports virtual disks up to 64 TB (65536 GB) in size, and is resilient to power failure events. This format is not supported in operating systems earlier than Windows 8 – Randy Schuman Aug 30 '16 at 07:23
  • Thank you very much all! I figured it out, it wasn't a Microsoft thing, it has something to do with something I can't really discuss here. – cameracode Aug 30 '16 at 17:48

0 Answers0