Contributor
Contributor

Getting Error Get-VmGuestNetworkInterface

Hi All,

I am trying get VM network configuration using Get-VmGuestNetworkInterface but getting below error.

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> get-vm xxxx

Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
xxxx                 PoweredOff 1        1.000

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-VMGuestNetworkInterface xxxx
Get-VMGuestNetworkInterface : 11/30/2012 11:55:32 AM    Get-VMGuestNetworkInterface        Timeout error while waiting for
VMware Tools to start in the guest.
At line:1 char:28
+ Get-VMGuestNetworkInterface <<<<  xxxx
    + CategoryInfo          : OperationTimeout: (:) [Get-VMGuestNetworkInterface], VimException
    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_WaitProcessInGuest_OperationTimeout,VMware.VimAutomation.ViCore
   .Cmdlets.Commands.GetVmGuestNetworkInterface

I am using below version of powercli

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-PowerCLIVersion

PowerCLI Version
----------------
   VMware vSphere PowerCLI 5.1 Release 1 build 793510

Any help will be appreciated.

Tags (1)
0 Kudos
4 Replies
Leadership
Leadership

From the message it looks as if the VMware Tools service/daemon is not running in the guest OS.

This cmdlet fetches it's info through the VMware Tools interface.


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

0 Kudos
Contributor
Contributor

Is there any way to check using powercli about VMware service/daemon running on guest OS?

0 Kudos
Immortal
Immortal

As you need a running instance of VMware Tools, you need to power on the VM before running the command. If you don't have VMware Tools installed, you need to install them.

There's a number of other requirements as well which you can check out here.

A few minutes later (edit): You can try the Wait-Tools cmdlet which is supposed to wait for VMware tools to load. However, I believe you still need to power on the VM first.

0 Kudos
Leadership
Leadership

For a VM that has a Windows OS running, and provided you have remote connectivity available, you can do

$remoteVM = "MyVM" 
Get-WmiObject -Class win32_service -ComputerName $remoteVM | Where { $_.name -like "VMTools" } | Select Name,State


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

0 Kudos