VMware Cloud Community
de2rfg
Enthusiast
Enthusiast

New-VM and ContentLibraryItem not working (Could not convert field 'error' of structure 'com.vmware.vcenter.ovf.library_item.deployment_result' error.)

Hi,

I'm writing a script that should deploy VM's from our content libraries. But so far my tests fail. I always get an Could not convert field 'error' of structure 'com.vmware.vcenter.ovf.library_item.deployment_result'  error.

New release: PowerCLI 6.3 R1–Download it today! - VMware PowerCLI Blog - VMware Blogs

vSphere 6.0 Documentation Center

Example from above:

Get-ContentLibraryItem -Name TTYLinux | New-VM -Datastore datastore1 -VMHost 10.160.74.38

Adjusted to my environment:

PS C:\Users\de2rfg> Get-ContentLibraryItem -Name RHEL6 | New-VM -Datastore C23_Tiering_LUN034 -VMHost sdev2310.xxxx.xx

New-VM : 11.08.2016 08:39:57    New-VM        Could not convert field 'error' of structure 'com.vmware.vcenter.ovf.library_item.deployment_result'  

At line:1 char:38

+ Get-ContentLibraryItem -Name RHEL6 | New-VM -Datastore C23_Tiering_LUN034 -VMHos ...

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

    + CategoryInfo          : NotSpecified: (:) [New-VM], ViError

    + FullyQualifiedErrorId : VICore_VMServiceImpl_DeployFromLibraryItem_Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

I though this would be because of the missing name of the new VM, but it's not working either

PS C:\Users\de2rfg> Get-ContentLibraryItem -Name RHEL6 | New-VM -Name TestCL -Datastore C23_Tiering_LUN034 -VMHost sdev2310.xxxx.xx

New-VM : 11.08.2016 08:42:20    New-VM        Could not convert field 'error' of structure 'com.vmware.vcenter.ovf.library_item.deployment_result'  

At line:1 char:38

+ Get-ContentLibraryItem -Name RHEL6 | New-VM -Name TestCL -Datastore C23_Tiering_ ...

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

    + CategoryInfo          : NotSpecified: (:) [New-VM], ViError

    + FullyQualifiedErrorId : VICore_VMServiceImpl_DeployFromLibraryItem_Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

get-datastore C23_Tiering_LUN034

Name                               FreeSpaceGB      CapacityGB

----                               -----------      ----------

C23_Tiering_LUN034                   1.448,211       4.095,750

Get-ContentLibraryItem -Name RHEL6

Name                           ContentLibrary                 ItemType                       SizeGB       

----                           --------------                 --------                       ------       

RHEL6                          Global                         ovf                            0,000  

PowerCLI Version

----------------

   VMware vSphere PowerCLI 6.3 Release 1 build 3737840

---------------

Component Versions

---------------

   VMware Cloud Infrastructure Suite PowerCLI Component 6.3 build 3709081

   VMWare AutoDeploy PowerCLI Component 6.0 build 3736841

   VMWare ImageBuilder PowerCLI Component 6.0 build 3736841

   VMware vSphere PowerCLI Component 6.3 build 3709081

   VMware vSphere Update Manager PowerCLI 6.0 build 2503190

   VMware VDS PowerCLI Component 6.3 build 3709081

Reply
0 Kudos
5 Replies
rkeighley
Contributor
Contributor

I'm getting the exact same error.

Any luck getting it to work? I have been fighting with this all day.

Reply
0 Kudos
LucD
Leadership
Leadership

Out of curiosity, what does this display?

Get-ContentLibraryItem -Name RHEL6 | Select *


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
de2rfg
Enthusiast
Enthusiast

PowerCLI C:\> Get-ContentLibraryItem -Name RHEL6 | Select *

WARNING: PowerCLI scripts should not use the 'Client' property. The property will be removed in a future release.

SizeGB         : 0.0000054258853197097778320312

Description    :

CreationTime   : 11/12/2015 13:14:36

LastWriteTime  : 11/12/2015 13:15:36

ItemType       : ovf

ContentLibrary : Global

Id             : 4fccaa4e-4e56-4800-98af-3e79ab6b55df

Name           : RHEL6

Uid            : /VIServer=festo\de2rfg@sdes0234:443/ContentLibraryItem=4fccaa4e-4e56-4800-98af-3e79ab6b55df/

Client         : VMware.VimAutomation.ViCore.Impl.V1.VimClient

Content Library is broken in so many ways, we are considering to abandon it.

Reply
0 Kudos
rkeighley
Contributor
Contributor

What's really fun is when you can only see the libraries on the subscribers, not the master library via Powercli.
Nevermind actually deploy from them from powercli HAH

Reply
0 Kudos
dpetrella
Contributor
Contributor

We ran into this, too.  Several different errors, actually.  We're going to just use traditional templates until content libraries work more reliably.

Reply
0 Kudos