VMware {code} Community
EdGiardina
Contributor
Contributor

Trying to use VIX coupled with BlackBerry 10 simulator

I've got the basics down, I am using .NET managed wrappers around VIX to boot my BlackBerry 10 emulator. However, there's no 'Guest Tools', so I'm very limited in what I can do. Basically, I need to find out when the emulator is launched and ready (was thinking to attempt to telnet, which means discovering the IP of the simulator, ), and also be able to screen capture (which requires a login, which I can't figure out how to do).

Any help finding the IP and screen capturing for BB10 programmatically? Thanks!

Tags (2)
0 Kudos
3 Replies
lemke
VMware Employee
VMware Employee

Short of porting open-vm-tools to the emulator (not a clue how hard that could be), I suspect VIX isn't going to help much.  You may be able to use some MKS based tool to do the screen capture.  Maybe some other guest agent could report its IP somehow?

EdGiardina
Contributor
Contributor

That's pretty disheartening but I certainly don't have the skill level or the time table to port open-vm-tools. BB10 is Linux based so to the right person I'm sure it's not nearly as much of a bear as it could be. However, the Blackberry team didn't bother to do this, so I can't imagine it's THAT easy.

I'm just surprised about IP detection; I know the 'Controller' executable that Blackberry bundles with the simulator download can detect the IP address of a running simulator. And the VMWare player shows me the IP address in the lower left corner. So the Player knows the IP... that VIX cannot ask the player directly for the IP and instead has to ask the guest OS is kind of a pain.

I can probably use a native windows lib to capture the window area using an IntPtr to the window handle. But that's going to get me the window chrome and the black margin around the display representing the off-screen dragging area for off-screen swipe actions.

0 Kudos
abuckjoe
Contributor
Contributor

I've did it in one of my project, any vm that you boot will be assigned an ip, you can find the ip here:


C:\\ProgramData\\Application Data\\VMware\\vmnetdhcp.leases (with some text parsing, you should be able to retrieve it)


The only thing you need to have is the mac address of the vm instance, you can get the mac with vix,


here's a snippet of code:


   char *readValue = NULL;

   jobHandle = VixVM_ReadVariable(vmHandle, VIX_VM_CONFIG_RUNTIME_ONLY, "ethernet0.generatedAddress", 0, NULL,NULL);

   err = VixJob_Wait(jobHandle, VIX_PROPERTY_JOB_RESULT_VM_VARIABLE_STRING, &readValue, VIX_PROPERTY_NONE);


					
				
			
			
				
			
			
			
			
			
			
			
		
0 Kudos