<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    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>
    <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>
    <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="font-family:
            verdana,geneva,lucida,'lucida
            grande',arial,helvetica,sans-serif; font-size: 13px;">chown
            -R user:group /lib/udev/devices/device<br>
            adduser user<br>
            chown -R user:group /dev/device<br>
          </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>
    <br>
    Hope that helps,<br>
    <br>
    John Knight<br>
    Aretta Communications<br>
    <br>
    <br>
    On 11/21/2010 11:00 PM, Charles N Wyble wrote:
    <blockquote cite="mid:4CE9EAF5.8060709@knownelement.com" type="cite">Hello,
      <br>
      <br>
      I've been happily using openvz and proxmox (with only openvz
      guests) for some time now.&nbsp; Thank you very much for the fantastic
      work!
      <br>
      <br>
      I have a desire to pass through some PCI and USB devices to a USB
      guest. Is this possible? I read the man page for vzctl and saw
      <br>
      <br>
      &nbsp; --devnodes device:[r][w][q]|none
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Give&nbsp; the&nbsp; container&nbsp; an access (r - read, w -
      write, q - disk quota management, none - no access) to a device
      designated by the special file /dev/device. Device file is created
      in a container by vzctl. Example: vzctl set 777 --devnodes
      sdb:rwq.
      <br>
      <br>
      <br>
      but this seemed oriented towards disk drives. I'm not sure how to
      reference a PCI or USB device.
      <br>
      <br>
      Searching around the net, I saw that KVM seems to support USB/PCI
      passthrough. Does OpenVZ (or I should say proxmox with kernel
      <br>
      Linux knel-prod-proxmox2 2.6.32-4-pve #1 SMP Thu Oct 21 09:35:29
      CEST 2010 x86_64 GNU/Linux) support arbitrary device pass through?
      <br>
      <br>
      Thanks!
      <br>
      <br>
      Please let me know if any additional information is required.
      <br>
      <br>
      <br>
      <br>
      <br>
      --
      <br>
      Charles N Wyble
      <br>
      (818)280-7059 <a class="moz-txt-link-abbreviated" href="mailto:charles@knownelement.com">charles@knownelement.com</a>
      <br>
      President &amp; CEO Known Element Enterprises
      <br>
      _______________________________________________
      <br>
      Users mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Users@openvz.org">Users@openvz.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="https://openvz.org/mailman/listinfo/users">https://openvz.org/mailman/listinfo/users</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>