Share via


PowerShell Convert-VHD

Question

Monday, January 18, 2016 9:18 PM

Hi I am trying to convert two vhd files to vhdx. My OS is Windows 10 Pro.  Here is a copy of the error I am receiving:

Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS U:\ Convert-VHD –Path F:\Images\Symantec\Win7\ST-Office2-Disk0-OS-Fixed.vhd –DestinationPath F:\Images\Symantec\Win7\ST-Office2-Disk0-OS-Fixed.vhdx
Convert-VHD : The operation on computer 'ST-MANAGE' failed: Invalid class
At line:1 char:1

  • Convert-VHD –Path F:\Images\Symantec\Win7\ST-Office2-Disk0-OS-Fixed.v ...

    + CategoryInfo          : NotSpecified: (:) [Convert-VHD], VirtualizationException
    + FullyQualifiedErrorId : Unspecified,Microsoft.Vhd.PowerShell.Cmdlets.ConvertVhd

PS U:\

What does this error mean?

Thanks.

-JP

All replies (3)

Wednesday, March 9, 2016 6:42 AM ✅Answered | 1 vote

Hi Sir,

Please install hyper-v role then use these commands .

http://www.nextofwindows.com/how-to-enable-configure-and-use-hyper-v-on-windows-10

OR , you can just enable "hyper-v service" and hyper-v management tool :

Best Regards,

Elton

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .


Wednesday, February 3, 2016 9:13 PM

Have you tried putting the two disk paths in quotes?

Convert-VHD –Path "F:\Images\Symantec\Win7\ST-Office2-Disk0-OS-Fixed.vhd" –DestinationPath "F:\Images\Symantec\Win7\ST-Office2-Disk0-OS-Fixed.vhdx" 


Wednesday, March 9, 2016 3:48 PM

Yes, this is a Hyper-V specific cmdlet.

You can convert without installing Hyper-V though, using only components available in Windows Client:

http://itproctology.blogspot.com/2013/03/converting-vhdx-vhd-and-back-without.html

Brian Ehlert
http://ITProctology.blogspot.com
Learn. Apply. Repeat.