VMware Cloud Community
THEL1ZARDKING
Contributor
Contributor

Invoke-VMscript Broke In RHEL 6.2?

Hey Guys,

I am having an issue issuing Invoke-VMscript commands to my RHEL 6.2 VMs.

Testing on (ESXi, 5.0.0-623860) with (PoweCLI 5.0.1-581491) on (vCenter 5.0.0-455964) yields the following error.

Invoke-VMScript : 5/8/2012 10:34:07 AM    Invoke-VMScript        Failed to auth
enticate with the guest operating system using the supplied credentials.
At line:1 char:16
+ Invoke-VMscript <<<<  -ScriptText "ls -l /tmp"  -VM $vm_name -GuestCredential
$creds
    + CategoryInfo          : NotSpecified: (:) [Invoke-VMScript], ViError
    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_RunScriptInGuest_ViE
   rror,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript

Testing on (ESXi, 5.0.0-623860) with (PoweCLI 4.1 U1-332441) on (vCenter 5.0.0-455964) yields the following error.

Invoke-VMScript : 5/8/2012 8:02:24 AM    Invoke-VMScript        While performin
g operation 'Login in guest OS on VM "RHEL-TEST'' the following error occu
red: 'Authentication failure or insufficient permissions in guest operating sys
tem'
At D:\Ty\Shell_Provisioning\VM_Shell_Provisioning_v2.ps1:642 char:25
+                                     Invoke-VMscript <<<<  -ScriptText "echo $
vm_name eth0 $ip $netmask $gateway > /var/abt/tmp/identity.txt"  -VM $vm_info.A
nnotatedEntity -GuestCredential $creds -WarningAction SilentlyContinue  | out-f
ile "$log_path\$request_id.$reservation_id.$vm_name.Deployment_Log.txt" -append
    + CategoryInfo          : OperationStopped: (:) [Invoke-VMScript], VimExce
   ption
    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_VixWaitForJob_VixErr
   or,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript

Testing on (ESXi, 5.0.0-623860) with (PoweCLI 5.0.1-581491) on (vCenter 5.0.0-455964) using "vmrun.exe" syntax instead of Invoke-VMscript CMDlet yields the following error.

Error: Invalid user name or password for the guest OS

I am 100% sure I am using the correct credentials as I can login to the VM via root to both console and SSH.  I have attempted using the -GuestCredential as well as the -GuestUser/-GuestPass perameters and ensured that both VMwareTools and VIX are at the most current revision.  I am trying to figure out if this is a RHEL configuration issue or an imcopatability between vSphere 5 and RHEL-6.2.  Any information you guys could provide would be greatly appreciated.  My next step would be to open up a SR with VMware but I wanted to take it to you guys first and see if you are seeing the same thing.

Thanks in advance for any help you can provide.

0 Kudos
5 Replies
LucD
Leadership
Leadership

Are you running this from a 32-bit PowerCLI session ?

And according to the latest Invoke-VMScript doc it apparently only supports Red Hat 5 ?!?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
THEL1ZARDKING
Contributor
Contributor

Hey Luc, I am indeed using the 32-bit version.  I saw that that list of supported OS's you mentioned and was hoping that it was a typing error cause I have used Invoke-VMscript with RHEL 6.1 without problems. Either way it doesn't inspire confidence.

0 Kudos
LucD
Leadership
Leadership

Do you have a RHEL 5.x available to test ?

If it works against that one, then the doc might be correct Smiley Sad


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
THEL1ZARDKING
Contributor
Contributor

I have found a solution to this problem after several days of troubleshooting.

The issue appears to be in a problematic RPM.  Package "vmware-tools-services-8.6.0-3.x86_64.rpm"(5.0) appears to be the culprit, uninstalling this RPM package and then forcing and install of "vmware-tools-services-8.6.5-3.x86_64.rpm"(5.0u1) without any if it dependencies resolved the issue.  Currently I am in contact with VMware to find out the implication of doing so but hopfully this will help out other as it's not a RHEL issue but rather a VMware Tools issue.

Cheers!

0 Kudos
LucD
Leadership
Leadership

Great find. Thanks for sharing.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos