Closed muppet3000 closed 3 years ago
It's sounds like an Export-vApp failure, not the container itself. Can you grab the error details to understand more
$error[0] | select *
$error[0].Exception | select *
@dmilov I've added those lines after the export line and this is the output. (I've redacted the VIServer)
Exception : VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.NotSupported: 03/05/2021 08:11:41 Export-VApp The operation is not supported on
the object.
---> VMware.Vim.VimException: The operation is not supported on the object.
---> System.ServiceModel.FaultException: The operation is not supported on the object.
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args)
--- End of stack trace from previous location ---
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
at generatedProxy_1.HttpNfcLeaseSetManifestChecksumType(HttpNfcLeaseSetManifestChecksumTypeRequest )
at VMware.Vim.HttpNfcLease.HttpNfcLeaseSetManifestChecksumType(KeyValue[] deviceUrlsToChecksumTypes)
--- End of inner exception stack trace ---
at VMware.Vim.HttpNfcLease.HttpNfcLeaseSetManifestChecksumType(KeyValue[] deviceUrlsToChecksumTypes)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.ExportLeaseTaskToContainer(NfcLease lease, ManagedObjectReference
nfcLeaseReference, String exportName, VimClient vimClient, String description, ManagedObjectReference vappReference, ExportContainer
exportContainer, ClientSideTask task, SHAAlgorithm shaAlgorithm)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.<>c__DisplayClass12_2.<ExportVAppToContainer>b__1(NfcLease lease)
at VMware.VimAutomation.ViCore.Impl.V1.Host.Storage.NfcLease.RunNfcLeaseTask(NfcLeaseTask leaseTask)
--- End of inner exception stack trace ---
at VMware.VimAutomation.ViCore.Impl.V1.Host.Storage.NfcLease.RunNfcLeaseTask(NfcLeaseTask leaseTask)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.<>c__DisplayClass12_0.<ExportVAppToContainer>b__0(ClientSideTask t
ask, Object taskResult)
at VMware.VimAutomation.Sdk.Util10.Task.ClientSideTaskImpl.ThreadProc(Object obj)
TargetObject :
CategoryInfo : NotSpecified: (:) [Export-VApp], NotSupported
FullyQualifiedErrorId : Client20_NfcLease_RunNfcTask_Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.ExportVApp
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, /opt/deployment/packaging/export_vm.ps1: line 32
PipelineIterationInfo : {0, 1, 1}
DynamicType :
DynamicPropertyInternal :
FaultCause :
FaultMessage :
ErrorId : Client20_NfcLease_RunNfcTask_Error
ErrorCategory : NotSpecified
TargetObject :
RecommendedAction :
SessionId :
ConnectionId : /VIServer=REDACTED
Severity : Error
TargetSite : Void RunNfcLeaseTask(VMware.VimAutomation.ViCore.Impl.V1.Host.Storage.NfcLeaseTask)
StackTrace : at VMware.VimAutomation.ViCore.Impl.V1.Host.Storage.NfcLease.RunNfcLeaseTask(NfcLeaseTask leaseTask)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.<>c__DisplayClass12_0.<ExportVAppToContainer>b__0(ClientSideTask
task, Object taskResult)
at VMware.VimAutomation.Sdk.Util10.Task.ClientSideTaskImpl.ThreadProc(Object obj)
Message : 03/05/2021 08:11:41 Export-VApp The operation is not supported on the object.
Data : {ParameterValues}
InnerException : VMware.Vim.VimException: The operation is not supported on the object.
---> System.ServiceModel.FaultException: The operation is not supported on the object.
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] in
s, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] in
s, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args)
--- End of stack trace from previous location ---
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
at generatedProxy_1.HttpNfcLeaseSetManifestChecksumType(HttpNfcLeaseSetManifestChecksumTypeRequest )
at VMware.Vim.HttpNfcLease.HttpNfcLeaseSetManifestChecksumType(KeyValue[] deviceUrlsToChecksumTypes)
--- End of inner exception stack trace ---
at VMware.Vim.HttpNfcLease.HttpNfcLeaseSetManifestChecksumType(KeyValue[] deviceUrlsToChecksumTypes)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.ExportLeaseTaskToContainer(NfcLease lease, ManagedObjectReferenc
e nfcLeaseReference, String exportName, VimClient vimClient, String description, ManagedObjectReference vappReference, ExportConta
iner exportContainer, ClientSideTask task, SHAAlgorithm shaAlgorithm)
at VMware.VimAutomation.ViCore.Impl.V1.Service.VappServiceImpl.<>c__DisplayClass12_2.<ExportVAppToContainer>b__1(NfcLease lease
)
at VMware.VimAutomation.ViCore.Impl.V1.Host.Storage.NfcLease.RunNfcLeaseTask(NfcLeaseTask leaseTask)
HelpLink :
Source : VMware.VimAutomation.ViCore.Impl
HResult : -2146232832
Yes, there is Export-VApp
change in PowerCLI 12.2. There is a new parameter -SHAAlgorithm
which sets the default to SHA256
. In the previous version the param was missing but the default was SHA1. It is a breaking change but the decision was motivated with compliance to the latest security standards.
Can you try to update your script to pass -SHAAlgorithm SHA1
to the Export-vApp
?
Thanks, that's fixed it.
Out of interested what is the "proper" way of fixing this on the VCenter environment? I'd like to feed this back to our internal infrastructure team who maintain the system.
Thanks, that's fixed it.
Out of interested what is the "proper" way of fixing this on the VCenter environment? I'd like to feed this back to our internal infrastructure team who maintain the system.
Unfortunately, I can't help with that...
When using the following command:
(vmForExport and exportPath are sensible strings)
The command fails with the following output:
If this is a change to the functionality of the Export-VApp command please let me know and I will update our scripts (I'm unable to find any changelogs for the latest version of PowerCLI). Currently I've had to revert back to the Ubuntu 16.04 docker image.