Can I use the Kinect API on a virtual machine?
Asked Answered
W

7

11

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:

  • Visual C# 2010 Express
  • Microsoft Server Speech Platform Runtime
  • Microsoft Server Speech Recognition Language - Kinect
  • Microsoft Speech Platform SDK
  • Kinect for Windows SDK Beta

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.

Winthorpe answered 18/6, 2011 at 16:9 Comment(7)
I've tried it in Parallels Desktop 6 yesterday, and i had almost same problem with you. I'v got "NUI Uninitialized" with Skeletal Example, and no response with Sample Shape game. With Win7 Ultimate x64, Visual studio 2010 there's 3 entries in Device Manager, but "Kinect USB Audio" wasn't in "Sound, Video and Game controllers". now i'm trying to do with Parallels6+Win7x86 and VMware Fusion3+Win7x64. I think... there's 2 key problems with it, 1. recognizing "Kinect USB Audio" in Sound.... 2. usb hub problem... win7 in vm may recognize kinect hub with other usb devices. I think you also know thatGloom
Same exact issue here. I have a win7 x64 host but want to do my development on a win7 x32 VM. I was thinking that installing it on the host first might make a difference but I don't want to chance messing up my host machine.Entertain
@user809398 - caution is good - I installed VS 2010 Express / .NET 4.0 / Kinect API on a Windows 7 machine to test this out a few days ago and ended up breaking my existing VS 2008 TFS functionality. If you have any VS or .NET installs on the machine I'd definitely tread lightly.Winthorpe
If the VM sees the device, it'll work. If not, it won't. This is similar to dealing with graphics acceleration in a VM, in that the difficulty (from the VM mfr's point of view) is in getting the VM to recognize and interact with the resource without trashing the driver state if something goes wrong. Doing this sort of thing really breaks the whole idea of a VM, anyway.Codex
Idea: get an external USB drive, put Win7 on it, and boot off of that. The drives are cheap and it'll give you most of the benefits of the VM. And (for the Mac guys who are about to go find and downvote every answer I've ever posted) you get to use a real operating system.Codex
I gave up on installing Kinect to the VM and installed on my laptop. I couldn't get it to work in the VM, but it works fine on the host laptop.Rosen
Just sharing that I can see Kinect connected. Ubuntu 11.10, VMWare Player 3.1.4.Stretto
E
6

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.

Entertain answered 21/6, 2011 at 23:10 Comment(1)
Yeah that's the sentence I understood as implying that it is possible - i.e., you can't run Kinect applications on the VM unless you have the drivers on the VM.Winthorpe
T
2

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,

Theis answered 20/3, 2012 at 23:59 Comment(0)
D
1

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.

Dhahran answered 13/5, 2013 at 22:33 Comment(2)
Maybe I should update this question - there was only one Kinect back then, now there are two and a lot of code has been released. And it sounds like running under a VM works...Winthorpe
Hi, Can you please tell me how you cab able to run it? I am using Maverix and vmware fusion - win 7. All the drivers been installed properly but unfortunately kinect is not not working.Swagerty
T
0

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.

Thanh answered 7/12, 2011 at 18:9 Comment(0)
O
0

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.

Odey answered 27/10, 2012 at 21:3 Comment(0)
E
0

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.

Erratic answered 23/6, 2013 at 20:37 Comment(0)
N
0

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!

Noise answered 23/2, 2015 at 8:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.