LoginSignup
7
7

More than 5 years have passed since last update.

VirtualBox上の仮想OSでWebカメラを使えるようにする

Posted at

はじめに

VirtualBoxでは仮想OSでWebカメラを使用する際に設定が必要だ.備忘録としてここに手順を残す.

環境

ホストOS Windows10 Home
ゲストOS Ubuntu16.04LTS
VirtualBox VirtualBox 5.1.3

Extension Packの導入

使用しているVirtualBoxのバージョンに合ったExtension Packをダウンロードする.

ダウンロードページ

ホストOS上での操作

Extension Packのダウンロードに成功したら,ターミナルにてコマンドによるVirtualBoxの操作を行う.

今回はホストOSがWindows10であることを想定しているのでコマンドプロンプト上による操作を前提とする.

コマンドプロンプトからVirtualBoxのプログラムファイルが格納されているディレクトリに移動することでVirtualBoxに設定を行うVBoxManageコマンドを使用できる.

C:\Users\username>cd ../../
C:\>
C:\>cd Program Files\Oracle\VirtualBox
C:\Program Files\Oracle\VirtualBox>

VBoxManage list runningvmsで使用している仮想マシンの環境を表示できる.

C:\Program Files\Oracle\VirtualBox>VBoxManage list runningvms
"<Guest Machine name>" {}

VBoxManage list webcamsで仮想マシンにて使用可能なWebカメラを確認できる.

C:\Program Files\Oracle\VirtualBox>VBoxManage list webcams
Video Input Devices: 1
.1 "Chicony USB 2.0 WebCamera"
"path of webcam"

上記の実行結果に表示されている.1がWebカメラに割り振られている番号である.

仮想マシン名とWebカメラの番号が確認できた場合,仮想マシンにてWebカメラを使用する設定を下記のコマンドで行う.

C:\Program Files\Oracle\VirtualBox>VboxManage controlvm "<Guest Machine name>" webcam attach .1

VirtualBoxの設定

設定に成功すると,VirtualBoxのウィンドウにてDevicesのメニューにWebcamsの項目が追加されている.

この項目にチェックを入れることで仮想マシン上でWebカメラが使用できるようになる.

7
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7