8 Replies Latest reply on Jan 6, 2011 4:47 AM by pauljawood

    Get-VMHostProfile

    alanrenouf Master
    VMware Employees

      I am trying to do a Get-VMHostProfile with PowerCLI 4.1 (tried 32 and 64bit) and I get the following error:

       

      Get-VMHostProfile : 14/09/2010 14:17:45    Get-VMHostProfile

      At line:1 char:18

      + Get-VMHostProfile <<<<

          + CategoryInfo          : NotSpecified: ( , InvalidProperty

          + FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_CreateProfileByMoRef_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostProfile

       

      My vCenter is also 4.1.

       

      Anyone else confirm this is an issue with them ?

       

      Alan Renouf

      http://virtu-al.net

        • 1. Re: Get-VMHostProfile
          LucD Guru
          User ModeratorsCommunity WarriorsvExpert

          Yes, I see the same error.

           

           

           

           

          ____________

          Blog: LucD notes

          Twitter: lucd22

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          1 person found this helpful
          • 2. Re: Get-VMHostProfile
            alanrenouf Master
            VMware Employees

            Doh ! - Guess I will bug the dev team then

             

            Alan Renouf

            http://virtu-al.net

            • 3. Re: Get-VMHostProfile
              ykalchev Expert
              VMware Employees

              Yes, it's an issue in PowerCLI 4.1 and some vCenter 4.1 servers that have hidden cluster profile created by default. You can check this by examing ClusterProfileManager object:

               

              $si = Get-View ServiceInstance
              $clProfileMgr = Get-View ($si.Content.ClusterProfileManager)
              $clProfileMgr.Profile
              

               

              The immediate workaround in that case would be:

              Get-VMHostProfile -Entity $vmhost 
              

              or

              Get-VmHostProfile -Entity *
              

              for all entities.

              But this workaround works only for Host Profiles that are already attached to an ESX(i) host or a cluster.

              Btw there is no need to file a new bug for this issue, we've already fixed it for the next release

               

              Regards,

              Yasen Kalchev

              PowerCLI Dev Team

              • 4. Re: Get-VMHostProfile
                LucD Guru
                Community WarriorsUser ModeratorsvExpert

                Yasen, these 3 default cluster profiles seem to be compliance checks for FT.

                Is it safe to delete these if one doesn't use FT in the vCenter ?

                And can they be deleted ?

                 

                The reason for asking, your bypass with the -Entity parameter works.

                But that is only valid if the host profile is attached to at least 1 host and doesn't allow one to use the -ApplyOnly parameter on the Apply-VMHostProfile cmdlet.

                 

                 

                 

                 

                ____________

                Blog: LucD notes

                Twitter: lucd22

                Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                • 5. Re: Get-VMHostProfile
                  ykalchev Expert
                  VMware Employees

                  Hi Luc,

                  I'm not familiar with this new functionality so I need to research what these profiles are for and if you can safely delete them.

                  I'll let you know asap as I have any info about it

                   

                   

                  Regards,

                  Yasen Kalchev

                  PowerCLI Dev Team

                  • 6. Re: Get-VMHostProfile
                    allencrawford Hot Shot

                    Is it also known (or am I the only one here having this problem?) that specifying a host profile by name also does not work?  For example, I'm typing:

                     

                    Get-VMHostProfile -Name <name>

                     

                    And it is throwing this error:

                     

                    Get-VMHostProfile : 11/11/2010 1:43:59 PM    Get-VMHostProfile
                    At line:1 char:18
                    + Get-VMHostProfile <<<<  -Name GMR
                        + CategoryInfo          : NotSpecified: (:) [Get-VMHostProfile], InvalidProperty
                        + FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_CreateProfileByMoRef_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.Ge
                       tVMHostProfile
                    
                    Get-VMHostProfile : 11/11/2010 1:43:59 PM    Get-VMHostProfile        VMHostProfile with name 'name' was not found, using the specified filter(s).
                    At line:1 char:18
                    + Get-VMHostProfile <<<<  -Name GMR
                        + CategoryInfo          : ObjectNotFound: (:) [Get-VMHostProfile], VimException
                        + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostProfile
                    

                     

                    Because without being able to "get" a host profile, my export/import script seems impossible because I'd like to use "Apply-VMHostProfile" with the -AssociateOnly parameter to assign my newly imported host profiles to their proper clusters.  Looks like I'm going to have to do it by hand (or play with the API maybe).

                    • 7. Re: Get-VMHostProfile
                      allencrawford Hot Shot

                      I've downloaded PowerCLI 4.1.1 and this is indeed fixed, though it isn't listed as fixed on the "complete" changelog found here: http://www.vmware.com/support/developer/PowerCLI/changelog.html#PowerCLI41U1.

                      • 8. Re: Get-VMHostProfile
                        pauljawood Enthusiast

                        Hi,

                         

                        I can confirm that installing U1 has fixed that issue but opened up a few more. I can no longer import my vmtx files as new-vm as it complains that they are not virtual machines.