http://www.linux-vserver.org/index.php?title=USB_Devices&feed=atom&action=historyUSB Devices - Revision history2024-03-28T12:48:43ZRevision history for this page on the wikiMediaWiki 1.20.2http://www.linux-vserver.org/index.php?title=USB_Devices&diff=4932&oldid=prevGlenn: + Category:Documentation2011-10-21T19:43:21Z<p>+ <a href="/Category:Documentation" title="Category:Documentation">Category:Documentation</a></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:43, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 52:</td>
<td colspan="2" class="diff-lineno">Line 52:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Documentation]]</ins></div></td></tr>
</table>Glennhttp://www.linux-vserver.org/index.php?title=USB_Devices&diff=4338&oldid=prev82.240.204.2 at 19:17, 20 June 20102010-06-20T19:17:34Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:17, 20 June 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 44:</td>
<td colspan="2" class="diff-lineno">Line 44:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>On the new Ubuntu (10.04), /proc/bus/usb does no longer exist. Here is a solution to declare the USB tree :  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>On the new Ubuntu (10.04), /proc/bus/usb does no longer exist. Here is a solution to declare the USB tree :  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{{</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><pre></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mkdir -p /vservers/<guest>/dev/bus/usb</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mkdir -p /vservers/<guest>/dev/bus/usb</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>echo "/dev/bus/usb /dev/bus/usb ext3 rbind 0 0" >> /etc/vservers/<guest>/fstab</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>echo "/dev/bus/usb /dev/bus/usb ext3 rbind 0 0" >> /etc/vservers/<guest>/fstab</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">}}</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></pre></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td></tr>
</table>82.240.204.2http://www.linux-vserver.org/index.php?title=USB_Devices&diff=4337&oldid=prev82.240.204.2: /* Declare USB tree in UBUNTU Lucid Lynx */2010-06-20T19:17:06Z<p><span dir="auto"><span class="autocomment">Declare USB tree in UBUNTU Lucid Lynx</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:17, 20 June 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 44:</td>
<td colspan="2" class="diff-lineno">Line 44:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>On the new Ubuntu (10.04), /proc/bus/usb does no longer exist. Here is a solution to declare the USB tree :  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>On the new Ubuntu (10.04), /proc/bus/usb does no longer exist. Here is a solution to declare the USB tree :  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{{</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mkdir -p /vservers/<guest>/dev/bus/usb</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mkdir -p /vservers/<guest>/dev/bus/usb</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>echo "/dev/bus/usb /dev/bus/usb ext3 rbind 0 0" >> /etc/vservers/<guest>/fstab</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>echo "/dev/bus/usb /dev/bus/usb ext3 rbind 0 0" >> /etc/vservers/<guest>/fstab</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td></tr>
</table>82.240.204.2http://www.linux-vserver.org/index.php?title=USB_Devices&diff=4336&oldid=prev82.240.204.2 at 19:16, 20 June 20102010-06-20T19:16:29Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:16, 20 June 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 39:</td>
<td colspan="2" class="diff-lineno">Line 39:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Now enter the guest, and see if you can see `/proc/bus/usb/devices`.  Better still, plug in a USB device and see if it shows up in there.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Now enter the guest, and see if you can see `/proc/bus/usb/devices`.  Better still, plug in a USB device and see if it shows up in there.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Declare USB tree in UBUNTU Lucid Lynx ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">On the new Ubuntu (10.04), /proc/bus/usb does no longer exist. Here is a solution to declare the USB tree : </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">mkdir -p /vservers/<guest>/dev/bus/usb</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">echo "/dev/bus/usb /dev/bus/usb ext3 rbind 0 0" >> /etc/vservers/<guest>/fstab</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Thanks ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</div></td></tr>
</table>82.240.204.2http://www.linux-vserver.org/index.php?title=USB_Devices&diff=4328&oldid=prev80.121.2.210: Undo revision 4026 by 127.0.0.1 (Talk)2010-06-04T13:37:09Z<p>Undo revision 4026 by <a href="/Special:Contributions/127.0.0.1" title="Special:Contributions/127.0.0.1">127.0.0.1</a> (<a href="/index.php?title=User_talk:127.0.0.1&action=edit&redlink=1" class="new" title="User talk:127.0.0.1 (page does not exist)">Talk</a>)</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 13:37, 4 June 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">European Patent Office </del>and <del class="diffchange diffchange-inline">by </del>the <del class="diffchange diffchange-inline">Organisation </del>for <del class="diffchange diffchange-inline">Economic Cooperation </del>and <del class="diffchange diffchange-inline">Development</del>. ,</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">== Unhide the `/proc/bus/usb` directory ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">On the host, you can do one of the following:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">To do it as a '''''one-off''''', type the following as root:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">vnamespace -n bash</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">umount -n /proc/bus/usb</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">setattr --~hide /proc/bus</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">:''Note:'' this creates a new namespace </ins>and <ins class="diffchange diffchange-inline">lauches bash in that context.  It then umounts </ins>the <ins class="diffchange diffchange-inline">USB filesystem and then unhides the USB subsystem.  Note that this doesn't unmount USB </ins>for <ins class="diffchange diffchange-inline">the host, or any existing guests, but the umount is necessary for the setattr to take effect.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">To make this '''''persist for a specific guest''''', add the following to `/etc/vservers/<guest>/scripts/pre-start`:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">:''Note'' this is a bit of brute force.  It enables ''all'' guests to see USB (assuming they have the right `fstab` entry, below, </ins>and <ins class="diffchange diffchange-inline">doesn't turn it off.  If you want to be more fancy, you can probably rehide the USB when the guest is shut down</ins>. <ins class="diffchange diffchange-inline"> However</ins>, <ins class="diffchange diffchange-inline">this will break if you have more than once guest using USB</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
</table>80.121.2.210http://www.linux-vserver.org/index.php?title=USB_Devices&diff=4026&oldid=prev127.0.0.1: /* Unhide the `/proc/bus/usb` directory */2009-10-23T00:46:22Z<p><span dir="auto"><span class="autocomment">Unhide the `/proc/bus/usb` directory</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 00:46, 23 October 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">== Unhide the `/proc/bus/usb` directory ==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">European Patent Office </ins>and <ins class="diffchange diffchange-inline">by </ins>the <ins class="diffchange diffchange-inline">Organisation </ins>for <ins class="diffchange diffchange-inline">Economic Cooperation </ins>and <ins class="diffchange diffchange-inline">Development</ins>. ,</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">On the host, you can do one of the following:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">To do it as a '''''one-off''''', type the following as root:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"><pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">vnamespace -n bash</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">umount -n /proc/bus/usb</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">setattr --~hide /proc/bus</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">:''Note:'' this creates a new namespace </del>and <del class="diffchange diffchange-inline">lauches bash in that context.  It then umounts </del>the <del class="diffchange diffchange-inline">USB filesystem and then unhides the USB subsystem.  Note that this doesn't unmount USB </del>for <del class="diffchange diffchange-inline">the host, or any existing guests, but the umount is necessary for the setattr to take effect.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">To make this '''''persist for a specific guest''''', add the following to `/etc/vservers/<guest>/scripts/pre-start`:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"><pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">:''Note'' this is a bit of brute force.  It enables ''all'' guests to see USB (assuming they have the right `fstab` entry, below, </del>and <del class="diffchange diffchange-inline">doesn't turn it off.  If you want to be more fancy, you can probably rehide the USB when the guest is shut down</del>. <del class="diffchange diffchange-inline"> However</del>, <del class="diffchange diffchange-inline">this will break if you have more than once guest using USB</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
</table>127.0.0.1http://www.linux-vserver.org/index.php?title=USB_Devices&diff=3908&oldid=prevDaniel hozac: Undo revision 3899 by 68.224.49.143 (Talk)2009-09-16T01:29:31Z<p>Undo revision 3899 by <a href="/Special:Contributions/68.224.49.143" title="Special:Contributions/68.224.49.143">68.224.49.143</a> (<a href="/index.php?title=User_talk:68.224.49.143&action=edit&redlink=1" class="new" title="User talk:68.224.49.143 (page does not exist)">Talk</a>)</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 01:29, 16 September 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">doors</del>.<del class="diffchange diffchange-inline">txt</del>;<del class="diffchange diffchange-inline">10</del>;<del class="diffchange diffchange-inline">15</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">== Unhide the `/proc/bus/usb` directory ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">On the host, you can do one of the following:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">To do it as a '''''one-off''''', type the following as root:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">vnamespace -n bash</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">umount -n /proc/bus/usb</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">setattr --~hide /proc/bus</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">:''Note:'' this creates a new namespace and lauches bash in that context</ins>. <ins class="diffchange diffchange-inline"> It then umounts the USB filesystem and then unhides the USB subsystem.  Note that this doesn't unmount USB for the host, or any existing guests, but the umount is necessary for the setattr to take effect.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">To make this '''''persist for a specific guest''''', add the following to `/etc/vservers/<guest>/scripts/pre-start`:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">vnamespace -n bash -c "umount -n /proc/bus/usb </ins>; <ins class="diffchange diffchange-inline">setattr --~hide /proc/bus </ins>; <ins class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">:''Note'' this is a bit of brute force.  It enables ''all'' guests to see USB (assuming they have the right `fstab` entry, below, and doesn't turn it off.  If you want to be more fancy, you can probably rehide the USB when the guest is shut down.  However, this will break if you have more than once guest using USB</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
</table>Daniel hozachttp://www.linux-vserver.org/index.php?title=USB_Devices&diff=3899&oldid=prev68.224.49.143: /* Unhide the `/proc/bus/usb` directory */2009-09-15T11:04:37Z<p><span dir="auto"><span class="autocomment">Unhide the `/proc/bus/usb` directory</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 11:04, 15 September 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>By default, USB devices you plug in to your physical host are not available to your vserver guests.  To make all your USB devices available to a specific guest, follow these instructions:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">== Unhide the `/proc/bus/usb` directory ==</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">doors</ins>.<ins class="diffchange diffchange-inline">txt</ins>;<ins class="diffchange diffchange-inline">10</ins>;<ins class="diffchange diffchange-inline">15</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">On the host, you can do one of the following:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">To do it as a '''''one-off''''', type the following as root:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"><pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">vnamespace -n bash</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">umount -n /proc/bus/usb</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">setattr --~hide /proc/bus</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">:''Note:'' this creates a new namespace and lauches bash in that context</del>. <del class="diffchange diffchange-inline"> It then umounts the USB filesystem and then unhides the USB subsystem.  Note that this doesn't unmount USB for the host, or any existing guests, but the umount is necessary for the setattr to take effect.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">To make this '''''persist for a specific guest''''', add the following to `/etc/vservers/<guest>/scripts/pre-start`:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"><pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">vnamespace -n bash -c "umount -n /proc/bus/usb </del>; <del class="diffchange diffchange-inline">setattr --~hide /proc/bus </del>; <del class="diffchange diffchange-inline">setattr --~hide /proc/bus/usb"</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">:''Note'' this is a bit of brute force.  It enables ''all'' guests to see USB (assuming they have the right `fstab` entry, below, and doesn't turn it off.  If you want to be more fancy, you can probably rehide the USB when the guest is shut down.  However, this will break if you have more than once guest using USB</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
</table>68.224.49.143http://www.linux-vserver.org/index.php?title=USB_Devices&diff=2440&oldid=prev220.233.170.235: /* Unhide the `/proc/bus/usb` directory */2007-04-21T11:21:45Z<p><span dir="auto"><span class="autocomment">Unhide the `/proc/bus/usb` directory</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 11:21, 21 April 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 19:</td>
<td colspan="2" class="diff-lineno">Line 19:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">:''Note'' this is a bit of brute force.  It enables ''all'' guests to see USB (assuming they have the right `fstab` entry, below, and doesn't turn it off.  If you want to be more fancy, you can probably rehide the USB when the guest is shut down.  However, this will break if you have more than once guest using USB</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
</table>220.233.170.235http://www.linux-vserver.org/index.php?title=USB_Devices&diff=2439&oldid=prev220.233.170.235 at 11:17, 21 April 20072007-04-21T11:17:13Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 11:17, 21 April 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 19:</td>
<td colspan="2" class="diff-lineno">Line 19:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>vnamespace -n bash -c "umount -n /proc/bus/usb ; setattr --~hide /proc/bus ; setattr --~hide /proc/bus/usb"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">== Thanks ==</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Mount the USB filesystem in the guest ==</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 41:</td>
<td colspan="2" class="diff-lineno">Line 37:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Now enter the guest, and see if you can see `/proc/bus/usb/devices`.  Better still, plug in a USB device and see if it shows up in there.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Now enter the guest, and see if you can see `/proc/bus/usb/devices`.  Better still, plug in a USB device and see if it shows up in there.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Thanks ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Information came from [http://www.paul.sladen.org/vserver/archives/200610/0053.html this thread] (credit: Daniel Hokka Zakrisson) and from followup in IRC on 21 April 2007, again credit to Daniel.</ins></div></td></tr>
</table>220.233.170.235