Failing to attach built in Webcam to Guest OS

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Dante16
Posts: 5
Joined: 18. Nov 2018, 06:10

Failing to attach built in Webcam to Guest OS

Post by Dante16 »

Hello everyone,

I'm new to virtual box so I need some help please.

I was trying to add my laptops built in Webcam from my host OS (Win 7) to my Guest OS (also Win 7) and got this error when using the "vboxmanage controlvm webcam attach" command :

vboxmanage.exe: error: code e_fail (0x80004005) - unspecified error (extended in fo not available)

vboxmanage.exe: error: context: "lockmachine(a->session, locktype_shared)" at li ne 388 of file vboxmanagecontrolvm.cpp


Anyone got any idea what is causing this and how I can fix it ?

Thank you.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

Please give the exact command typed.

Also the output of the command: VBoxManage list webcams.
Dante16
Posts: 5
Joined: 18. Nov 2018, 06:10

Re: Failing to attach built in Webcam to Guest OS

Post by Dante16 »

These are the commands used and their output :



Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd c:\Program Files\Oracle\VirtualBox

c:\Program Files\Oracle\VirtualBox>VBoxManage list webcams
Video Input Devices: 1
.1 "Lenovo EasyCamera"
\\?\usb#vid_0bda&pid_5728&mi_00#7&382583e6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c
9223196}\global

c:\Program Files\Oracle\VirtualBox>VboxManage controlvm "Win 7" webcam attach .1

VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended in
fo not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at li
ne 388 of file VBoxManageControlVM.cpp

c:\Program Files\Oracle\VirtualBox>
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

That looks ok.

Next, I need to see a VM log. With the VM fully shut down, right click it in the GUI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
Dante16
Posts: 5
Joined: 18. Nov 2018, 06:10

Re: Failing to attach built in Webcam to Guest OS

Post by Dante16 »

This is the log.
Attachments
Win 7-2018-11-18-14-44-44.rar
(22.33 KiB) Downloaded 24 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

Thanks, but I'm still not seeing anything obviously wrong.

Webcam passthrough is a special case of USB passthrough, so I'm now thinking there's something wrong with USB passthrough. E.g. it's connected to the USB 3 bus (Windows 7 guests have no native USB3 support).

Please show me the output of "VBoxManage list usbhost".
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

A separate oddity, which has nothing to do with your problem:
VBox.log wrote: 00:00:01.356448 File system of 'C:\Users\Andrei\VirtualBox VMs\Win 7\Snapshots' (snapshots) is ntfs
00:00:01.356459 File system of 'D:\VirtualBox VMs\Win 7\Win 7.vhd' is ntfs
You seem to have the VM split across two folders on two drives. I assume this was to save space on the C drive, but this is not the correct way to do it: this just creates a backup error waiting to come in the future. You should have moved the entire VM folder: Howto: Move a VM.
Dante16
Posts: 5
Joined: 18. Nov 2018, 06:10

Re: Failing to attach built in Webcam to Guest OS

Post by Dante16 »

Code: Select all

c:\Program Files\Oracle\VirtualBox>VBoxManage list usbhost
Host USB Devices:

UUID:               ad45f806-5a0b-4771-b885-f80c51b6fe80
VendorId:           0x357d (357D)
ProductId:          0x7788 (7788)
Revision:           2.3 (0203)
Port:               2
USB version/speed:  2/High
Manufacturer:       JMicron
Product:            USB to ATA/ATAPI Brid
SerialNumber:       3309A966127885
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0006
Current State:      Busy

UUID:               4c5a707b-54fc-4b40-8c26-340be81924bd
VendorId:           0x1ea7 (1EA7)
ProductId:          0x0064 (0064)
Revision:           2.0 (0200)
Port:               1
USB version/speed:  1/Full
Product:            2.4G Mouse
Address:            {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0002
Current State:      Busy

UUID:               8589809f-6ead-443c-a64f-6ac23424a566
VendorId:           0x0bda (0BDA)
ProductId:          0x5728 (5728)
Revision:           0.19 (0019)
Port:               4
USB version/speed:  2/High
Manufacturer:       Realtek Semiconductor Corp.
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0007
Current State:      Busy

UUID:               d2854f1d-72c6-4e45-a9a5-8512db66fde5
VendorId:           0x05ac (05AC)
ProductId:          0x0256 (0256)
Revision:           1.0 (0100)
Port:               2
USB version/speed:  1/Full
Manufacturer:       Telink
Product:            Wireless Receiver
Address:            {36fc9e60-c465-11cf-8056-444553540000}\0012
Current State:      Busy


c:\Program Files\Oracle\VirtualBox>
There was no actual move of the virtual drive but the original drive was created in Kali Linux on D
But unfortunatly the guest editions did not work under Linux so I intsalled Oracle VM in Windows 7
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

And again I see nothing wrong. I even checked that 0BDA:5728 is a webcam. It would seem so (I couldn't find an explicit list, but all listed Realtek 57xx device ids seem to be webcams).

Pass. The problem may be a driver problem in the guest rather than any actual VM problem.
Dante16
Posts: 5
Joined: 18. Nov 2018, 06:10

Re: Failing to attach built in Webcam to Guest OS

Post by Dante16 »

To my surprise it started working all of a sudden, just kep deleting the drive and creating and reinstalling Windows a few times and voila.
No clue what made it work ...

But the webca has extreme LAG :x is there a way to make the connection or communication between the host and guest faster or something ?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Failing to attach built in Webcam to Guest OS

Post by mpack »

No, there is nothing you can do to make it faster, other than reducing the frame size. Piping video takes a lot of bandwidth - a VM can't always do it on shared hardware.
Post Reply