1 Reply Latest reply on Mar 28, 2019 11:13 PM by Growlert

    Can I set CIVM name, CIVM computername or other parameters via PowerCLI

    Growlert Lurker

      Hello!

      The main question in topic. I tried this one example:

      $VM = get-civm 'centos_template'

      ($VM.ExtensionData.Section | where {$_ -is [VMware.VimAutomation.Cloud.Views.guestCustomizationSection]}).computername = 'centos'

      But it's not working...

      I found some useful article how to set some parameters of VM here GeekAfterFive - Infrastructure as Code . Looks like that is possible, but you must know exact section and property. Where can I get this?

       

      And the second quiestion.

      The performance of requests through the powershell module is a bit sloooow. Is it by design or it depends on performance inside the Vcloud Provider I'm connecting to? In my org connection latency to cloud is ~7ms.

       

      Thanks.

        • 1. Re: Can I set CIVM name, CIVM computername or other parameters via PowerCLI
          Growlert Lurker

          OK. After doing some investigation I answered the main question by myself. So commands to achieve the goal look like this:

           

          $VM = get-civm 'centos-template'

          ($VM.ExtensionData.Section[3]).computername = 'CentOS'

          $VM.ExtensionData.Section[3].UpdateServerData()

          $VM.ExtensionData.name = 'CentOS'

          $VM.ExtensionData.UpdateServerData()

           

          As you see the command I missed was invoke the method to apply changes. Works great!

          On the other hand I have to do double applying these settings which takes more time than I perform one action through VMWare Web Console after making multiple changes on VM. Is it possible to make the same through PS instead of wasting time to apply each change separately?