1 Reply Latest reply on Jun 6, 2019 11:04 AM by sk84

    vApp is losing auto NAT when re-configuring main network

    shaharsib Novice

      Hi,

      When deploying template from organization X to organization Y

      my main network (lets call it mgmt) mgmt is losing configuration. so i reconfigured mgmt to the right configuration and all of my VMs inside my vapp gets natted.

       

       

      But when im doing the same action with CLI with this command

      Get-CIVAppNetwork -VApp $NewVapp -name *mgmt-192* | Set-CIVAppNetwork -FirewallEnabled:$false -NatEnabled:$true -ParentOrgNetwork $Parentnetwork

      the window from the picture above gets empty

      But when I click on add I can see the lost vms->

      So the question is how to reconfigure the mgmt network and keep all the vms auto natted?

      is there any way to add all the vms again with CLI ?

      thanks!

        • 1. Re: vApp is losing auto NAT when re-configuring main network
          sk84 Expert
          vExpert

          Get-CIVAppNetwork -VApp $NewVapp -name *mgmt-192* | Set-CIVAppNetwork -FirewallEnabled:$false -NatEnabled:$true -ParentOrgNetwork $Parentnetwork

          What is the content of the variable "$Parentnetwork" ?

           

          As far as I know, the option "-ParentOrgNetwork" requires an object from type "OrgNetwork". Not a string. So, if you only specify the name in this variable it won't work.

           

          If that's the case with you, something like this could work:

          $Parentnetwork = Get-OrgNetwork -Name 'orgNetworkName'

          Get-CIVAppNetwork -VApp $NewVapp -name *mgmt-192* | Set-CIVAppNetwork -FirewallEnabled:$false -NatEnabled:$true -ParentOrgNetwork $Parentnetwork