Ed Norris
Ed Norris

Reputation: 4493

Can I use the Kinect API on a virtual machine?

This programming guide implies that this is possible, so I figure what the heck.

Right now, though, it doesn't work.

Host OS is Vista 64-bit, VMWare Workstation 6.5.3 is running Windows 7 Enterprise 32-bit.

Installed Software on the VM:

I plug in the Kinect, the device is recognized by the VM, then I run the Sample Shape Game and it doesn't recognize the device. It says "Plug in the Kinect and try again" which turns out to be error 0x80080014, which leads to http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/4da8c75e-9aad-4dc3-bd83-d77ab4cd2f82/ which gives me two things to look at:

  1. is it plugged in with the special cable? yes
  2. are all 4 entries in the Device Manager? no

In the Device Manager, I see a "Microsoft Kinect" group containing Microsoft Kinect Audio Control, Microsoft Kinect Camera and Microsoft Kinect Device, but there is nothing under "Sound, video and game controllers" other than VMware VMaudio. "Kinect USB Audio" should be there.

I'm guessing that there is some further twiddling I have to do with the VMWare USB / hardware options (whatever that tray with the USB / CD / HD / floppy etc icons is called) or some deft combination of rebooting and (un)plugging, but I'm almost out of enthusiasm.

Any ideas? TIA

EDIT: I realized that I had some lingering drivers on my host (Vista) system from OpenKinect. After removing them, I can no longer see the Kinect at all in the VM. Hmm.

Upvotes: 11

Views: 8353

Answers (7)

user4596119
user4596119

Reputation: 1

First of all you just need two Things to be installed:

  1. libfreenect
  2. libusb

after that you should set three flags to 0x02 at the line

typedef enum {FREENECT_DEVICE_MOTOR = 0x02,FREENECT_DEVICE_CAMERA = 0x02,FREENECT_DEVICE_AUDIO = 0x02,} freenect_device_flags;

Inside the headerfile located at /usr/local/include/libfreenect libfreenect.h but you will lose the ability to control the movement and the the microphone usage will be disabled so don't even try to access them or your device might get damaged after that you should also set

#define PKTS_PER_XFER 32

#define NUM_XFERS 6

inside your libfreenect/src/usb_libusb10.h file at the linux Line After that rebuild your libfreenect by

mkdir build 
cd build cmake ..  
make make install.

Than Restart your virtual System and plug and connect only the Kinect Camera Device and no other Kinect device during start of the VM. When System is up you could test your device is properly working by switching to your previously created libfreenect build directory and go to bin there you run ./freenect-camtest you should get no or only a small number of package losses if a lot of losses occur try restart your vm with the camera device pluged in and already connected to your vm. You might need to active disconnect and connect the Webcam from the VM during startup to receive images this should be done during first seconds of VM Boottime!

Works with Ubuntu 14.04 and Workstation 10 and 11 and 11.1 HOST OS Windows 7 and Kinect SDK installed and Kinectdevice for Windows Also it seems to be quite unstable you often have to restart your virtual system if you can't receive images from your Kinect. But if you once received images don't unplug device or you won't get data until you reboot virtual system with Kinect Camera connected to it.

=> This actually solved the problem otherwise to much frames get lost and its not possible to display proper image!

Upvotes: 0

Stuart Berg
Stuart Berg

Reputation: 18162

This page from Microsoft says that the "Kinect for Windows" device should work in a VM, but that the "Kinect for XBOX" does NOT work.

Upvotes: 0

Jason Lynch
Jason Lynch

Reputation: 91

I'm late to the party, but we've been running and developing for the Kinect with Windows 7 running under VMWare under Mac OS X Mountain Lion.

Upvotes: 1

Nicholas Pappas
Nicholas Pappas

Reputation: 10624

The most recent version of Microsoft Kinect for Windows (v1.6, possibly slightly earlier versions) in combination with the "Kinect for Windows" hardware does work inside a virtual machine. I run this setup on a MacBook Pro, Parallels 7 and Windows 7.

Note that a Kinect for Xbox does not work inside a virtual machine.

Upvotes: 0

João Quintas
João Quintas

Reputation: 861

just to share that (not really understood how) VM Workstation 8 running in a host win 7 x64 with guest OS Ubuntu 10.04 sucessfully detected and installed Kinect drivers.

I was able to test it with libfreenect (OpenKinect Project) http://openkinect.org/wiki/Getting_Started#Manual_Build_on_Linux

best regards,

Upvotes: 2

Jim
Jim

Reputation: 9

I'm not a Computer Scientist, but I thought Turing showed that a universal Touring Machine was basically the same as physical hardware. I've had Distributed COM+ running on 3 or 4 VM's on the same physical hardware, but somehow the Kinect device is different? I don't buy that at all.

Upvotes: 0

jasv
jasv

Reputation: 106

There is this on read.me

Virtual machines: You must run applications built with the Kinect for Windows SDK Beta in a native Windows environment. Kinect for Windows applications cannot run in a virtual machine, because the Microsoft Kinect drivers and this SDK Beta must be installed on the computer where the application is running.

Upvotes: 6

Related Questions