1 2 3 Previous Next 44 Replies Latest reply on Oct 31, 2019 1:50 AM by dalo Go to original post
      • 15. Re: command works on windows, but fails on linux powercli
        LucD Guru
        vExpertUser ModeratorsCommunity Warriors

        No, not yet.

        The 2nd user, the AD account where it fails, do you use that for the Connect-VIServer?

        While being logged on to the Linux box as root?

        • 16. Re: command works on windows, but fails on linux powercli
          dalo Hot Shot

          Yes, I login to the vcenter with a different user.

          • 17. Re: command works on windows, but fails on linux powercli
            dalo Hot Shot

            Like this:

             

            linux:

            PS /root> Connect-VIServer -server ourvcenter -credential(Get-Credential)

             

            PowerShell credential request

            Enter your credentials.

            User: domainuser

            Password for user domainuser: *

             

            Name                           Port  User

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

            ourvcenter           443   domain\domainuser

             

            PS /root> Get-ResourcePool

             

            Name                 CpuSharesL CpuReserva CpuLimitMH MemSharesL MemReservationG MemLimitGB

                                 evel       tionMHz    z          evel       B

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

            Resources            Normal     0          0          Normal     0.000           0.000

            TestResourcePool     Normal     0          60478      Normal     0.000           274.320

             

             

            PS /root> get-folder

            Name                           Type

            ----                           ----

            Datencenter                    Datacenter

            vm                             VM

            network                        Network

            host                           HostAndCluster

            datastore                      Datastore

            myfolder                       VM

             

            PS /root> New-VM -name blahLinux -ResourcePool TestResourcePool -Location myfolder

            New-VM : 2/11/19 1:48:25 PM     New-VM

            At line:1 char:1

            + New-VM -name blahLinux -ResourcePool TestResourcePool -Location myfol ...

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

            + CategoryInfo          : NotSpecified: (:) [New-VM], VimException

            + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

             

             

             

             

            Windows:

            PS C:\Users\> Connect-VIServer -server ourvcenter -credential(Get-Credential)

             

             

            cmdlet Get-Credential at command pipeline position 1

            Supply values for the following parameters:

            Credential

             

             

            Name                           Port  User

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

            ourvcenter           443   domain\domainuser

             

             

             

             

            PS C:\Users\> Get-ResourcePool

             

             

            Name                 CpuSharesL CpuReserva CpuLimitMH MemSharesL MemReservationG MemLimitGB

                                 evel       tionMHz    z          evel       B

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

            Resources            Normal     0          0          Normal     0.000           0.000

            TestResourcePool     Normal     0          60478      Normal     0.000           274.320

             

             

             

             

            PS C:\Users\> get-folder

             

             

            Name                           Type

            ----                           ----

            Datencenter                    Datacenter

            vm                             VM

            network                        Network

            host                           HostAndCluster

            datastore                      Datastore

            myfolder                       VM

             

             

             

             

            PS C:\Users\> New-VM -name blahWin -ResourcePool TestResourcePool -Location myfolder

             

             

            Name                 PowerState Num CPUs MemoryGB

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

            blahWin              PoweredOff 1        0.250

            • 18. Re: command works on windows, but fails on linux powercli
              LucD Guru
              vExpertCommunity WarriorsUser Moderators

              I just created an AD user with a Role that has the exact same privileges you listed.
              And I also get the exception when doing a New-VM from that account.
              BUT I get it in Linux session as well as in a Windows session.

              And from the Web Client is works.

               

              I'm using PowerCLI 11.1.0.

               

              I'm  doing some further tests to see if a missing privilege might cause this.

              • 19. Re: command works on windows, but fails on linux powercli
                LucD Guru
                Community WarriorsUser ModeratorsvExpert

                I'm now pretty sure this is a PowerCLI bug.
                The New-VM doesn't even get to the vCenter.

                And when I run it with the RunAsync switch, there is no Task object created.
                So it all seems to be happening in the cmdlet before it even goes out to the vCenter.

                1 person found this helpful
                • 20. Re: command works on windows, but fails on linux powercli
                  dalo Hot Shot

                  Thank you for confirming this!

                   

                  I try to upgrade to 11.1.0 too, but with "Install-Module -Name VMware.PowerCLI"

                  I only get 11.0.0 even if I completely uninstall everything.

                  • 21. Re: command works on windows, but fails on linux powercli
                    LucD Guru
                    vExpertCommunity WarriorsUser Moderators

                    Take care, the 11.1.0 version does not upgrade all modules to that version.
                    With Get-Module -Name VMware* -ListAvailable, you should see 3 modules on 11.1.0

                    modules.jpg

                    • 22. Re: command works on windows, but fails on linux powercli
                      dalo Hot Shot

                      On 11.0.0 it fails on my windows too.

                      It seems that the last working Version was 10.1.0 here.

                       

                      • 23. Re: command works on windows, but fails on linux powercli
                        dalo Hot Shot

                        Ok, thanks, then I'm on 11.1.0 too

                        • 24. Re: command works on windows, but fails on linux powercli
                          dalo Hot Shot

                          Any News on this LucD? Should I open a Bug Report?

                          • 25. Re: command works on windows, but fails on linux powercli
                            LucD Guru
                            Community WarriorsUser ModeratorsvExpert

                            No, I'm afraid I haven't heard or found anything.

                             

                            Perhaps best to open a SR

                            • 26. Re: command works on windows, but fails on linux powercli
                              dalo Hot Shot

                              OK, I will do that and update this thread.

                              Thank you very much for your contribution!

                              • 27. Re: command works on windows, but fails on linux powercli
                                dalo Hot Shot

                                short update:

                                finally I got a answer from engineering: "We've made some changes in New-VM in PowerCLI 11.2 and I want to make sure that the issue still reproduces there."

                                But it seems It's even worse now: I could not login anymore as the user with the special permissions.

                                Login and create a VM in the Webclient works as usual.

                                • 28. Re: command works on windows, but fails on linux powercli (version issue)
                                  nnedev Hot Shot
                                  VMware Employees

                                  dalo,

                                  I'm trying to reproduce the issue. Please provide the information listed below:

                                  • Error message. I can see that the New-VM cmdlet throws an error but can't see the actual error message.
                                  • VirtualCenter version
                                  • Get-ErrorReport log

                                  Thanks,

                                  Nedko

                                   

                                  P.S. I've already contacted LucD for details. He's on VC 6.7U2 now and can't reproduce.

                                  • 29. Re: command works on windows, but fails on linux powercli (version issue)
                                    dalo Hot Shot

                                    Hello nnedev,

                                     

                                    Thank you for looking at this.

                                    As I wrote above; with the new pcli version I could even not login anymore as the restricted user (Web and REST works as expected).

                                    VC Version: 6.5.0.23100

                                     

                                     

                                    Connect-VIServer our-vc.domain.local -credential (get-credential)

                                     

                                     

                                    cmdlet Get-Credential at command pipeline position 1

                                    Supply values for the following parameters:

                                    Credential

                                    Connect-VIServer : 24.04.2019 07:26:55  Connect-VIServer                Permission to perform this operation was denied. Required privilege 'System.Read' on managed object with id 'OptionManager-VpxSettings'.

                                    At line:1 char:1

                                    + Connect-VIServer our-vc.domain.local -credential (get-credential)

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

                                        + CategoryInfo          : SecurityError: (:) [Connect-VIServer], NoPermission

                                        + FullyQualifiedErrorId : ViCore_ConnectivityServiceImpl_GetSetting_NoPermission,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

                                     

                                     

                                    get-module vmware* | select name,version

                                     

                                     

                                    Name                          Version

                                    ----                          -------

                                    VMware.Vim                    6.7.0.12483609

                                    VMware.VimAutomation.Cis.Core 11.2.0.12483642

                                    VMware.VimAutomation.Common   11.2.0.12483627

                                    VMware.VimAutomation.Core     11.2.0.12483638

                                    VMware.VimAutomation.Sdk      11.2.0.12483635