4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AbbyAdvent Calendar 2014

Day 2

systemd-nspawnのコンテナからホストのUSBデバイスさわる

Last updated at Posted at 2014-12-02

systemd-nspawnコンテナ内からホストのUSBデバイスに触る方法を調べたので残しておく。

dockerの例を参考に、以下のようにbindしたらできた。

systemd-nspawn --boot --bind=/dev/bus/usb --directory=/var/lib/container/sample

lsusb などを叩いて、ホスト側と同じ結果が返ってくればOK。

場合によっては --boot ではなく、chroot相当の --share-system を使わなければならないこともあるかもしれないが、ひとまずこれだけで問題なかった。

4
3
0

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
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?