esxi-simple-web icon indicating copy to clipboard operation
esxi-simple-web copied to clipboard

Shutdown/power on controls not functioning in ESXi 5.1

Open Norbs12 opened this issue 11 years ago • 18 comments

Title says it all, I have not been able to get power off/on to work on any of my VMs via the web access.

Norbs12 avatar Sep 28 '13 21:09 Norbs12

do you mind posting the result of the ajax call here?

weikinhuang avatar Sep 29 '13 15:09 weikinhuang

It works well for a specific VM on the "vm.html" page, but not on the "vm-list.html" page. The shutdown prompt never displays.

jcheff avatar Oct 01 '13 19:10 jcheff

I don't mind posting the Ajax call but I have no clue how to get that info.

Norbs12 avatar Oct 01 '13 19:10 Norbs12

That's weird. I couldn't reproduce the issue. I have a commit upcoming that removes power functions from the vm-list page soon

weikinhuang avatar Oct 01 '13 19:10 weikinhuang

Does it require a reboot of the host? Are you on the latest esxi build?

Norbs12 avatar Oct 01 '13 19:10 Norbs12

It shouldn't require a reboot of the host, does it work on the individual vm page?

weikinhuang avatar Oct 01 '13 19:10 weikinhuang

It didn't seem to work on either. I'm going to reboot just for the hell of it and report back.

Norbs12 avatar Oct 01 '13 19:10 Norbs12

Tested on ESXi 5.5 and the poweron / poweroff does not work on the vm or wm-list screens. Has the API call changed?

bschmidt001 avatar Oct 29 '13 00:10 bschmidt001

Are you guys using the free ESXi? I haven't tested it on that version.

weikinhuang avatar Oct 29 '13 13:10 weikinhuang

ESXi does not come in different flavors from version to version - only different licensing. That being said, I've tested it on both with the same results.

jcheff avatar Oct 29 '13 14:10 jcheff

Yes, the version I am using it on is ESXi 5.5. You can get a free license for ESXi 5.5, if you are interested in grabbing a copy and testing.

bschmidt001 avatar Nov 01 '13 13:11 bschmidt001

can you try going to https://{{esxihost}}/mob/?moid={{vmid}} and trying the poweron/poweroff methods in the ESX mob and let me know if they work. I'm directly POSTing to those built in methods. You can find the {{vmid}} by searching through the mob or using this webapp (it's in the url of the vm)

weikinhuang avatar Nov 02 '13 17:11 weikinhuang

Wei Kin Huang -

Good day. I performed the below. On executing, I received:

Managed Object Type: ManagedObjectReference:VirtualMachine Managed Object ID: 9

Properties Name Type Value alarmActionsEnabled boolean Unset availableField CustomFieldDef[] capability VirtualMachineCapability capability config VirtualMachineConfigInfo config configIssue Event[] configStatus ManagedEntityStatus "green" customValue CustomFieldValue[] datastore ManagedObjectReference:Datastore[] 5267bfc5-cba57a8c-2c69-002590d1167a (datastore2) declaredAlarmState AlarmState[] disabledMethod string[] "vim.ExtensibleManagedObject.setCustomValue" "vim.ManagedEntity.destroy" "vim.ManagedEntity.addTag" "vim.ManagedEntity.removeTag" "vim.VirtualMachine.refreshStorageInfo" "vim.VirtualMachine.retrieveBackupAgent" "vim.VirtualMachine.revertToCurrentSnapshot" "vim.VirtualMachine.upgradeVirtualHardware" "vim.VirtualMachine.extractOvfEnvironment" "vim.VirtualMachine.powerOn" "vim.VirtualMachine.shutdownGuest" "vim.VirtualMachine.rebootGuest" "vim.VirtualMachine.standbyGuest" "vim.VirtualMachine.answer" "vim.VirtualMachine.customize" "vim.VirtualMachine.checkCustomizationSpec" "vim.VirtualMachine.migrate" "vim.VirtualMachine.relocate" "vim.VirtualMachine.clone" "vim.VirtualMachine.exportVm" "vim.VirtualMachine.markAsTemplate" "vim.VirtualMachine.markAsVirtualMachine" "vim.VirtualMachine.unregister" "vim.VirtualMachine.resetGuestInformation" "vim.VirtualMachine.unmountToolsInstaller" "vim.VirtualMachine.upgradeTools" "vim.VirtualMachine.upgradeToolsFromImage" "vim.VirtualMachine.setScreenResolution" "vim.VirtualMachine.defragmentAllDisks" "vim.VirtualMachine.createSecondary" "vim.VirtualMachine.turnOffFaultTolerance" "vim.VirtualMachine.makePrimary" "vim.VirtualMachine.terminateFaultTolerantVM" "vim.VirtualMachine.disableSecondary" "vim.VirtualMachine.enableSecondary" "vim.VirtualMachine.setDisplayTopology" "vim.VirtualMachine.setDisplayTopologyModes" "vim.VirtualMachine.stopRecording" "vim.VirtualMachine.startReplaying" "vim.VirtualMachine.stopReplaying" "vim.VirtualMachine.promoteDisks" "vim.VirtualMachine.unlock" "vim.VirtualMachine.queryChangedDiskAreas" "vim.VirtualMachine.queryUnownedFiles" "vim.VirtualMachine.diagnoseResourceAllocation" "vim.VirtualMachine.reloadFromPath" "vim.VirtualMachine.queryVrmPolicy" "vim.VirtualMachine.updateVrmPolicy" "vim.VirtualMachine.queryFaultToleranceCompatibility" "vim.VirtualMachine.invokeFSR" "vim.VirtualMachine.terminate" "vim.VirtualMachine.isNativeSnapshotCapable" "vim.VirtualMachine.configureQuorumFilePathPrefix" "vim.VirtualMachine.retrieveQuorumFilePathPrefix" "vim.VirtualMachine.injectOvfEnvironment" "vim.VirtualMachine.wipeDisk" "vim.VirtualMachine.shrinkDisk" effectiveRole int[] -1 environmentBrowser ManagedObjectReference:EnvironmentBrowser 9-envmgr guest GuestInfo guest guestHeartbeatStatus ManagedEntityStatus "gray" layout VirtualMachineFileLayout layout layoutEx VirtualMachineFileLayoutEx layoutEx name string "devcache01" network ManagedObjectReference:Network[] HaNetwork-VM Network (VM Network) overallStatus ManagedEntityStatus "green" parent ManagedObjectReference:Folder ha-folder-vm (vm) parentVApp ManagedObjectReference:ManagedEntity Unset permission Permission[] recentTask ManagedObjectReference:Task[] resourceConfig ResourceConfigSpec resourceConfig resourcePool ManagedObjectReference:ResourcePool ha-root-pool (Resources) rootSnapshot ManagedObjectReference:VirtualMachineSnapshot[] runtime VirtualMachineRuntimeInfo runtime snapshot VirtualMachineSnapshotInfo Unset storage VirtualMachineStorageInfo storage summary VirtualMachineSummary summary tag Tag[] triggeredAlarmState AlarmState[] value CustomFieldValue[]

Methods Return Type Name VirtualMachineMksTicket AcquireMksTicket VirtualMachineTicket AcquireTicket void AnswerVM void CheckCustomizationSpec ManagedObjectReference:VirtualMachine CloneVM_Task void ConsolidateVMDisks_Task string CreateScreenshot_Task FaultToleranceSecondaryOpResult CreateSecondaryVM_Task ManagedObjectReference:VirtualMachineSnapshot CreateSnapshot_Task void CustomizeVM_Task void DefragmentAllDisks void Destroy_Task void DisableSecondaryVM_Task FaultToleranceSecondaryOpResult EnableSecondaryVM_Task StorageRequirement[] EstimateStorageForConsolidateSnapshots_Task ManagedObjectReference:HttpNfcLease ExportVm string ExtractOvfEnvironment void MakePrimaryVM_Task void MarkAsTemplate void MarkAsVirtualMachine void MigrateVM_Task void MountToolsInstaller void PowerOffVM_Task void PowerOnVM_Task void PromoteDisks_Task DiskChangeInfo QueryChangedDiskAreas MethodFault[] QueryFaultToleranceCompatibility string[] QueryUnownedFiles void RebootGuest void ReconfigVM_Task void RefreshStorageInfo void Reload void reloadVirtualMachineFromPath_Task void RelocateVM_Task void RemoveAllSnapshots_Task void Rename_Task void ResetVM_Task void ResetGuestInformation void RevertToCurrentSnapshot_Task void setCustomValue void SetDisplayTopology void SetScreenResolution void ShutdownGuest void StandbyGuest ManagedObjectReference:VirtualMachineSnapshot StartRecording_Task void StartReplaying_Task void StopRecording_Task void StopReplaying_Task void SuspendVM_Task void TerminateVM void TerminateFaultTolerantVM_Task void TurnOffFaultToleranceForVM_Task void UnmountToolsInstaller void UnregisterVM void UpgradeTools_Task void UpgradeVM_Task

On clicking ShutdownGuess, I then clicked Invoke Method and received:

Managed Object Type: MANAGEDOBJECTREFERENCE:VIRTUALMACHINE Managed Object ID: 9 Method: SHUTDOWNGUEST

VOID SHUTDOWNGUEST

Parameters

    NAME
    TYPE
    VALUE

    Invoke Method

Method Invocation Result: RestrictedVersion

    NAME
    TYPE
    VALUE

    dynamicProperty
    DynamicProperty[]
    Unset

    dynamicType
    string
    Unset

    faultCause
    MethodFault
    Unset

    faultMessage
    LocalizableMessage[]
    Unset

On 2013-11-02 13:48, Wei Kin Huang wrote:

can you try going to https://{{esxihost}}/mob/?moid={{vmid}} and trying the poweron/poweroff methods in the ESX mob and let me know if they work. I'm directly POSTing to those built in methods. You can find the {{vmid}} by searching through the mob or using this webapp (it's in the url of the vm)

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/weikinhuang/esxi-simple-web/issues/2#issuecomment-27627113

bschmidt001 avatar Nov 12 '13 17:11 bschmidt001

Wei Kin Huang -

The same result also applies for PowerOffVM_Task and ResetVM_Task.

Blaine Schmidt

On 2013-11-02 13:48, Wei Kin Huang wrote:

can you try going to https://{{esxihost}}/mob/?moid={{vmid}} and trying the poweron/poweroff methods in the ESX mob and let me know if they work. I'm directly POSTing to those built in methods. You can find the {{vmid}} by searching through the mob or using this webapp (it's in the url of the vm)

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/weikinhuang/esxi-simple-web/issues/2#issuecomment-27627113

bschmidt001 avatar Nov 12 '13 17:11 bschmidt001

Wei Kin Huang -

More information on the server:

SERVERNAME VMWARE ESXI 5.5.0, 1331820

RESOURCES

Uptime 17 DAYS Since Oct 25, 2013 5:25:06 PM

Cpu: 525 MHZ / 12 x 1999 MHz

Memory: 32466 MB / 65503 MB

STORAGE: 1 DATASTORE(S)

DATASTORE2 [2] Non-SSD 3.62 TB Free / 3.63 TB Total 4 VMs

NETWORK: 1 NETWORK(S)

VM NETWORK 4 VMs

GENERAL

MANUFACTURER Supermicro

MODEL X9DRL-3F/iF

CPU CORES 12 CPUs x 1999 MHz

PROCESSOR TYPE Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz

PROCESSOR SOCKETS 2

CORES PER SOCKET 6

LOGICAL PROCESSORS 24

NUMBER OF NICS 2

STATE Connected

VMS AND TEMPLATES 4

VMOTION ENABLED No

HOST CONFIG FOR FT Yes

On 2013-11-02 13:48, Wei Kin Huang wrote:

can you try going to https://{{esxihost}}/mob/?moid={{vmid}} and trying the poweron/poweroff methods in the ESX mob and let me know if they work. I'm directly POSTing to those built in methods. You can find the {{vmid}} by searching through the mob or using this webapp (it's in the url of the vm)

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/weikinhuang/esxi-simple-web/issues/2#issuecomment-27627113 [2] https://192.168.12.20/folder?dcPath=ha-datacenter&dsName=datastore2

bschmidt001 avatar Nov 12 '13 17:11 bschmidt001

I think I'm having a similar issue. I'm running ESXi 5.0 non free license and when I am using the vm list page, the shutdown / power on buttons will not work. If I click on the VM and then click on the shutdown / power on buttons, then it will work.

I'll have to dig more into the api calls to see what's going on.

nitrocode avatar May 19 '15 13:05 nitrocode

@nitrocode please do, thanks. I haven't had much time to work on this project lately.

weikinhuang avatar May 19 '15 14:05 weikinhuang

I'm pretty sure that this has something to do with the API restrictions in the free licensed ESXis. The API is read-only there :o(

BBQigniter avatar Oct 15 '15 14:10 BBQigniter