<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 11/21/2010 10:17 PM, John Knight wrote:
    <blockquote cite="mid:4CEA0B08.2000700@aretta.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <title></title>
      Hi Charles,<br>
      <br>
      OpenVZ does support passthrough to varying success rates depending
      on what you're doing (but I have yet to really find anything it
      doesn't work well with).&nbsp; <br>
    </blockquote>
    <br>
    Thanks. <br>
    <br>
    <blockquote cite="mid:4CEA0B08.2000700@aretta.com" type="cite"> <br>
      From the hardware node, you would run:<br>
      <br>
      "# vzctl set 1000 --devnodes device:rw --save"<br>
      <br>
      (where '1000' is your container id and 'device' is the device you
      want to passthrough in /dev/.&nbsp; In the above example you would be
      sharing the host node's /dev/device device.&nbsp; )<br>
    </blockquote>
    <br>
    Ah I see. It wasn't immediately clear to me from the man page if the
    path specification was /dev/device or just device. That clears
    things up a fair amount.&nbsp; Now I have to figure out what device in
    /dev I would use for a USB wireless card. :) <br>
    <br>
    <blockquote cite="mid:4CEA0B08.2000700@aretta.com" type="cite"> <br>
      Next, make sure that if a certain user beyond root needs access to
      this device that you set it up on the node and in the container:<br>
      <br>
      vzctl exec 1000 chown -R user:group /dev/device<br>
      vzctl exec 1000 <big><big><span class="Apple-style-span"
            style="border-collapse: separate; color: rgb(0, 0, 0);
            font-family: 'Times New Roman'; font-style: normal;
            font-variant: normal; font-weight: normal; letter-spacing:
            normal; line-height: normal; orphans: 2; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; font-size: medium;"><span
              class="Apple-style-span" style="">chown -R user:group
              /lib/udev/devices/device<br>
              adduser user<br>
              chown -R user:group /dev/device<br>
            </span></span></big></big></blockquote>
    <br>
    Ah right. <br>
    <br>
    <blockquote cite="mid:4CEA0B08.2000700@aretta.com" type="cite"><big><big><span
            class="Apple-style-span" style="border-collapse: separate;
            color: rgb(0, 0, 0); font-family: 'Times New Roman';
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            font-size: medium;"><span class="Apple-style-span" style="">
            </span></span></big></big><br>
      <br>
      So, summing it all up and giving an example, let's say you want to
      share the fictitional hardware device /dev/fake1 with container
      1000 and in the container you need to make it accessible by the
      user and group "fake user".&nbsp; The following are the commands you
      would use to do so:<br>
      <br>
      ------<br>
      # create the passthrough<br>
      vzctl set 1000 --devnode fake1:rw --save<br>
      <br>
      # assign permissions<br>
      vzctl exec 1000 chown -R fake1:fake1 /dev/fake1<br>
      vzctl exec 1000 chown -R fake1:fake1 /lib/udev/devices/fake1<br>
      <br>
      # add user on node so permissions stick through pam<br>
      adduser fake1<br>
      chown -R fake1:fake1 /dev/fake1<br>
      ------<br>
      <br>
      After performing the above from the hardware node the container is
      hosted on, you should now have a /dev/fake1 inside container 1000
      with the correct permissions.<br>
      <br>
      <br>
    </blockquote>
    <br>
    Fantastic. Thanks. I'll give it a shot and let the list know. <br>
  </body>
</html>