VMware Cloud Community
Johnezjohnez
Contributor
Contributor

Import-vApp

Hi

We backup VMs with PS script.

When I shall try to restore a VM in Powershell with Import-vApp I just get athis error, what is the problem?

PS C:\Users\a-serveradmin1> $myCluster = Get-Cluster -Name "Shared Cluster"

PS C:\Users\a-serveradmin1> $vmHost = Get-VMHost -Name "na-vmware-019.comp.local"

PS C:\Users\a-serveradmin1> Import-vApp -Source "D:\DEMO-BACKUP_old\Backup Test Machine\Backup Test Machine.OVF" -VMHost $vmHost -Location $myCluster -Name "Backup Test Machine"

Import-vApp : 10/28/2020 6:09:52 AM     Import-VApp             The OVF descriptor does not match the hash from

the manifest.

At line:1 char:1

+ Import-vApp -Source "D:\DEMO-BACKUP_old\Backup Test Machine\Backup Te ...

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

    + CategoryInfo          : InvalidArgument: (:) [Import-VApp], ViError

    + FullyQualifiedErrorId : ViCore_VappServiceImpl_ImportVApp_DescriptorHashManifestMistmatch,V

   Mware.VimAutomation.ViCore.Cmdlets.Commands.ImportVApp

PS C:\Users\a-serveradmin1>

Tags (2)
Reply
0 Kudos
4 Replies
scott28tt
VMware Employee
VMware Employee

Any errors if you try and import the same OVF using the vSphere Client or the OVFTool?


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

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
Johnezjohnez
Contributor
Contributor

Hi

To give some more background, info. normally we use vSphere Client to import OVF templates and that works well.

But when the name of the VM contain a blank space that fails, that why I wanted to see if I can use PS instead.

I have not tested to import a VM without space in the name with PowerShell I shall do that test during the day today.

I can not be the first one that want to import VMs from OVF templated on VMs that have blank space in the VM name?

I want to fix this; we use PS to export servers as a backup of an environment that we have that is not critical but we really do not want to rebuild the environment in an event of a failure (100 VMs)

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

I'm trying to work out if the issue is with the OVF or with the process you are trying to follow - using another import method is a process of elimination...


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

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
Johnezjohnez
Contributor
Contributor

I have tested with many VM to import and I can say that it not possible to import VMs with space in the name and the VMs that do not have that is possible to import.

We have 2 different cluster and it the same behavior on both clusters.

So, it would be interesting to know if that an issue for us or and normal behavior, have not find anything about that when I have done some googling.

Reply
0 Kudos