[VMC] Unable to deploy OVF using vSphere Client due to duplicate sections within the ovf file
search cancel

[VMC] Unable to deploy OVF using vSphere Client due to duplicate sections within the ovf file

book

Article ID: 314115

calendar_today

Updated On:

Products

VMware Cloud on AWS

Issue/Introduction

Symptoms:
  • When deploying an Deploy OVF Template and when selecting Select a compute resource the ERROR :"Issues detected with selected template. Details: - 145:5:SECTION_RESTRICTION: Multiple sections of type StorageSection (Storage policy group reference) not allowed." is generated

image.png


Cause

This occurs when you have previously used ovftool/powershell to import ovf file into vCenter , and when it is downloaded and re-imported  again.

Resolution

This will be fixed in an upcoming release.


Workaround:

You can use Powershell with PowerCLi to complete the task ,Make sure to replace the placeholders with the appropriate paths and names for your specific environment

# Connect to your vCenter server
Connect-VIServer -Server <vCenter_Server> -User <Username> -Password <Password>

# Set the path to the OVF file
$ovfPath = "C:\Users\Downloads\test\centos.ovf"

# Set the target location for the imported virtual machine
$VMHost = Get-Cluster | Get-VMHost | ?{$_.ConnectionState -eq "Connected"} | Get-Random
$Datastore = Get-Datastore -Name "vsanDatastore"


# Import the OVF file
Import-VApp -VMHost $VMHost -Datastore $Datastore -Source $ovfPath -Name centos