powershell - Import-vApp throwin Line 157: Duplicate element 'AddressOnParent' error -
i trying deploy ova file using powershell script. found script internet , modified little bit , execute. during execution @ import-vapp command seeing error: import-vapp line 157: duplicate element 'addressonparent'.
i able deploy ova manually. thru script, seeing error. appreciated.
please find powershell script below. (keeping important script below, per suggestion).
param( ) #---- custom ova properties ::> start <:: ----- # $vapppropertyid_ip4enable = "ipv4 enable" $vapp_ip4enable = "true" $vapppropertyid_ip4address = "ipv4 address" $vapp_ip4address = "10.51.98.20" $vapppropertyid_ip4netmask = "ipv4 netmask" $vapp_ip4netmask = "255.255.255.0" $vapppropertyid_ip4gateway = "ipv4 gateway" $vapp_ip4gateway = "10.51.98.1" $vapppropertyid_ip6enable = "ipv6 enable" $vapp_ip6enable = "false" #$vapppropertyid_ip6address = "ipv6 address" #$vapp_ip6address = "" #$vapppropertyid_ip6gateway = "ipv6 gateway" #$vapp_ip6gateway = "" $vapp_defaultroutekey = 1 $vapp_defaultroutecmd = "" #---- custom ova properties ::> end <:: ----- # $rp = get-resourcepool -name $resourcepool write-host " resoure pool = $rp" $cluster = $rp.extensiondata.owner $vhost = (get-cluster -id $cluster).extensiondata.host[0] write-host " vhost = $vhost " $vmhost = get-vmhost -id $vhost write-host " vmhost = $vmhost " if ($portprofile -ne "") {$portgroupid = get-virtualportgroup -name $portprofile -distributed -vmhost (get-vmhost $vmhost)} write-host "portgroup = $portgroupid" write-host "importing vapp .... " $ovalocation = "c:\script\s42700x8_1_1_a2.ova" write-host "vappname = $vappname" $vms = import-vapp -source $ovalocation -name $vappname -vmhost $vmhost #-location $rp -datastore $ds #$vms = import-vapp -source $ovalocation -name $vappname -location $rp -vmhost $vmhost -datastore $ds } { disconnect-viserver -confirm:$false }
output looks this:
ps c:\users\administrator> c:\script\ovatestfile2.ps1 9/22/2014 3:23:58 import-vapp line 157: duplicate element 'addressonparent'.
Comments
Post a Comment