VMware {code} Community
heyitspablo
VMware Employee
VMware Employee

Welcome VProbes Developers to our shiny new community

Folks - we are very happy to open up our new shiny community for our VProbes Developers ! Enjoy

Pablo Roesch

http://vmware.com/developer

Keep up with latest info on vSphere PowerCLI http://blogs.vmware.com/vipowershell - Follow me on Twitter @heyitspablo
Reply
0 Kudos
5 Replies
fixitchris
Hot Shot
Hot Shot

Enabling vProbes on Server 2.0 Win

#1 Add vprobe.allow = "TRUE" to C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini

#2 Add vprobe.enable = "TRUE" to \vm\vm.vmx

#3 Restart VM

#4 Read

#5 Watch

#6 Install CYGWIN from http://www.cygwin.com

Sample batch to List Version/Probes/Globals (%1 = password)

@echo off

ECHO.
ECHO ----Version
ECHO.

vmrun -T server -h https://localhost:8333/sdk -u username -p %1 vprobeVersion "[datastore1] vm\vm.vmx"

ECHO.
ECHO -----ListProbes
ECHO.

vmrun -T server -h https://localhost:8333/sdk -u username -p %1 vprobeListProbes "[datastore1] vm\vm.vmx"

ECHO.
ECHO -----ListGlobals
ECHO.

vmrun -T server -h https://localhost:8333/sdk -u username -p %1 vprobeListGlobals "[datastore1] vm\vm.vmx"

Sample Probe

The documentation mentions using CYGWIN for a good reason. I was unable to load a simple probe using CMD.exe.

./vmrun.exe -T server -h https://localhost:8333/sdk -u username -p password  vprobeLoad "[datastore1] \vm\vm.vmx" '(vprobe VMM1Hz (printf "hello   "))'

Once the probe is loaded see "/datastore1/ \vm\vprobe.out" for output.

Stop all probes

vmrun -T server -h https://localhost:8333/sdk -u username -p %1 vprobeReset "[datastore1] vm\vm.vmx"

Reply
0 Kudos
admin
Immortal
Immortal

Hi Chris,

Thanks for posting these steps. I am glad that you found the VProbes Reference document helpful.

In your original post, which I do not see in the forum anymore, you mentioned an interest in hacking on a PowerShell based VProbes toolkit. This sounds like a great project. Your best path forward is to use the VP syntax specification within the documentation as a starting point.

Thanks!

Rob

Reply
0 Kudos
fixitchris
Hot Shot
Hot Shot

Yes, my original post mentioned writing a windows interpreter. Copying the vprobes-toolkit and the api ref would be a start.

(just answering my own questions here)

What is this problem I keep running into when trying to load a simple probe through CMD.exe?

DTrace?

Vprobes as a passive debugger?

http://msdn.microsoft.com/en-us/library/ms681675(VS.85).aspx

comprehending Vprobe-toolkit

Emmett to VP script

1. TortoiseSVN

2. SVN Checkout...

3. WinHugs

Modify Options

"Allow Hugs/Ghc Extensions" or "-98"

Change your editor to something better than notepad.

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"

4. Run WinHugs and load "main.lhs"

:main -c "USEC:1001 { a[VCPUID, curprocname()]++; logaggr(a); }"

or from CMD

runhugs.exe -98 "main.lhs" -c "VMM1Hz logstr("hello\n")" 

but we still run into the double quote parsing issue...

Reply
0 Kudos
nhoxanh
Contributor
Contributor

Hi,

It looks like a cool tool. However, I have a question: how useful this is? Is it really helpful for real life?

I would love to see some case studies, or examples, on how Vprobes is helpful to solve the real problems. I dont see that from several examples in the documentation. Or I missed it?

Thanks,

NXA

Reply
0 Kudos
fixitchris
Hot Shot
Hot Shot

I would love to see more real life examples too...

Think about this, when you re debugging C# code using Visual Studio, you re only stepping through your code. What if your code is good, but the CLR is JITTING it all wrong! In this case you will need to go lower and debug the CLRs interaction with the operating system. The way I understand it, is that you could launch a debugger like softIce in the guest and everything might look OK, but until you launch a debugger a lower layer and point it at the hypervisor , you will never find out that the way the hypervisor is handling Intels and AMDs virtual helper instructions differently, possibly causing the awry behavior.

Reply
0 Kudos