VMware Cloud Community
Munel
Contributor
Contributor
Jump to solution

Get Virtual Hardware Information in Webview

Hello,

I have a Problem in the webview of my workflow.

The workflow changes CPU and RAM of a VM.

In the moment the workflow looks like this:

What I want to do is to insert the current CPU and RAM of the chosen VM in here:

But I have no clue how to do it. I hope someone here can help me.

mfg

Patrick

0 Kudos
1 Solution

Accepted Solutions
tschoergez
Leadership
Leadership
Jump to solution

Servus Patrick!

You can define "default values" in the input presentation of the workflow. (there is no way to include information in the tree-search-browser (at least no documented way).

There you can execute Actions, which returns the current vCPUs and RAM of the VM and fills the value in the input field after selecting the VM.

to do this:

1. create an action which returns the memory (and a second one for number of cpus) of a given VM.

2. edit the workflow, go to presentation tab, select the numberCPU input parameter, klick on the "add property" icon in the lower section, select "default value"

3 select the drop downfield to the arrow symbol (ognl expression) and klick to the puzzle icon on the right to select the action. filter for your action name, and select the "VM" input parameter as parameter for the action

4. the wizard should "render" the proper ognl-expression

5 save / finish Smiley Happy

Hints: Think about the Guest-OS-HAL when switching between 1 and multiple vCPUs, and prove that the memory value the user inserts is dividable by 4... (but these are vsphere-issues, not orchestrator Smiley Happy )

Grüße aus dem Allgäu!

Jörg

clicked to "post message" too early Smiley Happy

View solution in original post

0 Kudos
3 Replies
tschoergez
Leadership
Leadership
Jump to solution

Servus Patrick!

You can define "default values" in the input presentation of the workflow. (there is no way to include information in the tree-search-browser (at least no documented way).

There you can execute Actions, which returns the current vCPUs and RAM of the VM and fills the value in the input field after selecting the VM.

to do this:

1. create an action which returns the memory (and a second one for number of cpus) of a given VM.

2. edit the workflow, go to presentation tab, select the numberCPU input parameter, klick on the "add property" icon in the lower section, select "default value"

3 select the drop downfield to the arrow symbol (ognl expression) and klick to the puzzle icon on the right to select the action. filter for your action name, and select the "VM" input parameter as parameter for the action

4. the wizard should "render" the proper ognl-expression

5 save / finish Smiley Happy

Hints: Think about the Guest-OS-HAL when switching between 1 and multiple vCPUs, and prove that the memory value the user inserts is dividable by 4... (but these are vsphere-issues, not orchestrator Smiley Happy )

Grüße aus dem Allgäu!

Jörg

clicked to "post message" too early Smiley Happy

0 Kudos
Munel
Contributor
Contributor
Jump to solution

Hi,

Thank you, it worked verry well.

The last problem I have now is the Relode, I have to press the relode button every time I select a new VM.

Is there a way to automatic relode the View after selecting the VM?

Grüße vom Neckar

Patrick

0 Kudos
tschoergez
Leadership
Leadership
Jump to solution

Hi Patrick!

First, I don't think there is a solution for that Smiley Sad

Can you please try two things:

1. Try to reproduce the issue with different browsers and -versions (I can imagine the problem disappears with older Browsers (Firefox 2.x......)?

2. As paying customer: Open a support case for this issue to vmware!

(I dont think they can bring you a solution, but it increases the number of requests for a new-browser-comaptible webview technology...)

Cheers,

joerg

0 Kudos