VMware Cloud Community
tpagolfnut
Contributor
Contributor

Tools Update fails (FullyQualifiedErrorId)

Has anyone see the following error before. I have upgraded all my ESX hosts and when I run my script to update the VMs I get the following error. The script I am using is attached. Script does work on some VMs.

Update-Tools : 08/06/2010 4:08:14 AM Update-Tools Operation is not va

lid due to the current state of the object.

At C:\PowerCLi\toolsupdatehost.ps1:24 char:13

+ update-tools <<<< -guest (get-vmguest -vm (get-vm -name $i))

+ CategoryInfo : NotSpecified: (Smiley Happy , VimException

+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio

n.ViCore.Cmdlets.Commands.UpdateVmTools

Any help you can provide would be greatly appreciated.

Thanks...

Tags (2)
Reply
0 Kudos
16 Replies
LucD
Leadership
Leadership

Could it be that the guests where it fails don't have the VMware Tools installed ?

The Update-Tools cmdlet can only be used to 'upgrade' the VMware Tools.

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

If the tools aren't installed the error actually states so. I get this error on VMs where the state of the tools is "out of date".

Thanks...

Reply
0 Kudos
LucD
Leadership
Leadership

Do you get the message on all guests where the tools are "out of date" ?

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
LucD
Leadership
Leadership

Could you try it like this ?

Update-Tools -VM $i

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

Here is what I get.

Update-Tools : 08/06/2010 4:58:44 AM Update-Tools Operation is not va

lid due to the current state of the object.

At C:\PowerCLi\toolsupdatehost1.ps1:24 char:13

+ update-tools <<<< -vm $i

+ CategoryInfo : NotSpecified: (Smiley Happy , VimException

+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio

n.ViCore.Cmdlets.Commands.UpdateVmTools

Anymore ideas?

Thanks..

Reply
0 Kudos
LucD
Leadership
Leadership

What PowerCLI version are you using ?

Get-PowerCLIVersion

And what vCenter/ESX(i) versions ?

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

The script did work on about 30 of the 300+ VMs I need to upgrade.

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

PowerCLI Version

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

PowerCLI Version

-


VMware vSphere PowerCLI 4.1 build 264274

ESX hosts are 4.0.0,261974

VC is 4.0.0,208111

I was able to use Update Manager to update of the VMs that the script wouldn't.

Thanks...

Reply
0 Kudos
LucD
Leadership
Leadership

Just did a test, works ok for me.

What OS do you have on these guests ?

Does the InnerException tell us anything more ?

Can you do

$Error[0].Exception.InnerException

after an Update-Tools that gives an error ?

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

Here is the output:

C:\PowerCLi> $Error[0].Exception.InnerException

The operation is not allowed in the current state.

C:\PowerCLi>

The VM I am testing with is Windows 2003 Standard x32.. Nothing special...

Thanks.

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

I noticed a different error when I just run "get-vm VM | update-tools"

Update-Tools : 08/06/2010 5:33:52 AM Update-Tools Operation "Update V

Mware Tools." failed for VM "VM" for the following reason: The oper

ation for the entity VirtualMachine-2688 failed with the following message: "Er

ror upgrading VMware Tools."

At line:1 char:37

+ get-vm VM | update-tools <<<<

+ CategoryInfo : NotSpecified: (Smiley Happy , VimException

+ FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpda

tes_OperationFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.UpdateVmT

ools

Looks like that FullyQualifiedErrorId again.

Thanks..

Reply
0 Kudos
LucD
Leadership
Leadership

Can you do

Get-VM VM | Select *
Get-VM VM | Get-VMGuest | Select *

for the guest that threw the exception ?

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

Get-VM VM | Select *

PowerState : PoweredOn

Version : v7

Description :

Notes :

Guest : VMware.VimAutomation.ViCore.Impl.V1.VM.Guest.VMGuestI

mpl

NumCpu : 1

MemoryMB : 1024

HardDisks : {Hard disk 1}

NetworkAdapters : {Network adapter 1}

UsbDevices : {}

CDDrives : {CD/DVD Drive 1}

FloppyDrives : {Floppy drive 1}

Host : esx-vm4

HostId : HostSystem-ha-host

VMHostId : HostSystem-ha-host

VMHost : esx-vm4

VApp :

FolderId : Folder-ha-folder-vm

Folder : vm

ResourcePoolId : ResourcePool-ha-root-pool

ResourcePool : Resources

PersistentId : 50211a8b-8cb7-c70a-1b5a-304685b6eca5

UsedSpaceGB : 6.385615

ProvisionedSpaceGB : 21.00068

DatastoreIdList : {Datastore-x.x.x.x:/vol/NFS2/}

HARestartPriority :

HAIsolationResponse :

DrsAutomationLevel :

VMSwapfilePolicy : Inherit

VMResourceConfiguration : VMware.VimAutomation.ViCore.Impl.V1.VM.VMResourceConf

igurationImpl

CustomFields : {}

ExtensionData : VMware.Vim.VirtualMachine

Id : VirtualMachine-2688

Name : VM

Uid : /VIServer=root@esx-vm4:443/VirtualMachine=VirtualM

achine-2688/

Get-VM VM | Get-VMGuest | Select *

OSFullName : Microsoft Windows Server 2003, Standard Edition (32-bit)

IPAddress : {x.x.x.x}

State : Running

Disks : {VMware.VimAutomation.ViCore.Impl.V1.VM.Guest.DiskInfoImpl}

HostName : VM

Nics :

ScreenDimensions : {Width=1024, Height=768}

VmId : VirtualMachine-2688

VM : VM

VmUid : /VIServer=root@esx-vm4:443/VirtualMachine=VirtualMachine-

2688/

VmName : dev-s2k3-imoam

Uid : /VIServer=root@esx-vm4:443/VirtualMachine=VirtualMachine-

2688/VMGuest=/

GuestId : winNetStandardGuest

ExtensionData : VMware.Vim.GuestInfo

Reply
0 Kudos
LucD
Leadership
Leadership

Can't see anything wrong.

One more question, is there an ISO connected to the CD-drive ?

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos
tpagolfnut
Contributor
Contributor

No CD connected. I guess I will have to just manually update the ones that won't automatically update with the script.

Thanks for your help.

Reply
0 Kudos