Microsoft Virtualization Discussions

PowerShell Tool Kit - Converting XenServer VHD to VMDK

ohnemus
4,155 Views

Hello all!

Does the powershell toolkit provide any ability to convert thin provisioned XenServer VHD's to VMDK's?

If so what is the commandlet used to do that? - (ConvertTo-NcVmdk?)

 

Thanks for any info you can provide.

3 REPLIES 3

Shashanka
4,092 Views

Hi,

 

ConvertTo-NcVmdk is the cmdlet to convert VHD to VMDK. 

Please make sure about the XenServer Tools installed on the guest OS, you might want to uninstall it before converting the disk to VMDK.

 

Thanks,

Shashanka 

ohnemus
4,054 Views

Thanks for the reply.

 

We have tried to use the "ConvertTo-NaVmdk" commandlet and get the following error.

 

PS C:\windows\system32> ConvertTo-NcVmdk -SourceVhd x:\d37fb41f-556d-47c0-ab60-656444be2e5b.vhd

ConvertTo-NcVmdk : Specified argument was out of the range of valid values.

Parameter name: File is not a fixed-size VHD.

At line:1 char:1

+ ConvertTo-NcVmdk -SourceVhd x:\d37fb41f-556d-47c0-ab60-656444be2e5b.vhd

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (:) [ConvertTo-NaVmdk], ArgumentOutOfRangeException

    + FullyQualifiedErrorId : File not fixed VHD,DataONTAP.PowerShell.SDK.Cmdlets.HyperV.ConvertToNaVmdk

 

Does the VHD need to be a fixed size VHD to work? We can't do this with a thin VHD?

Thanks!

 

Shashanka
4,024 Views

Hello,

 

The Conversion is supported only for fixed size VHD and monolithic flat VMDK files.

Please convert the dynamic VHD to fixed size VHD before converting it to VMDK.

 

Regards,

Shashanka

Public