PLDWWW: Docs/Vserver

arekm arekm at pld-linux.org
Sat Nov 6 10:23:52 CET 2010


Author: arekm   Date: Sat Nov  6 09:23:52 2010 GMT
Module: PLDWWW   URL: http://www.pld-linux.org/Docs/Vserver?action=diff&rev2=149&rev1=148
---- Log message:


---- Page affected: Docs/Vserver

---- Diffs:

================================================================
  echo NET_RAW >> /etc/vservers/test/bcapabilities
  }}}
  
- Create /etc/vservers/test/scripts/post-start script:
+ Create /etc/vservers/test/scripts/pre-start script:
  
  {{{
  #!/bin/sh
  VSERVER_SCRIPT="$1"
  VSERVER_NAME="$2"
  
- ip link add name "eth-${VSERVER_NAME}" type veth peer name "eth-${VSERVER_NAME}"
+ ip link add name "veth-${VSERVER_NAME}" type veth peer name "eth-${VSERVER_NAME}"
  vserver ${VSERVER_NAME} exec sh -c 'exec sleep 60' &
  pid=$(vserver ${VSERVER_NAME} exec pidof -s sleep)
  ip link set "eth-${VSERVER_NAME}" netns $pid
@@ -1006, +1006 @@

  VSERVER_SCRIPT="$1"
  VSERVER_NAME="$2"
  
- ip link del "eth-${VSERVER_NAME}"
+ ip link del "veth-${VSERVER_NAME}"
  }}}
  
  You end with one interface on the host and one inside guest (virtually connected). Configure interfaces, routing as on normal system.


More information about the pld-cvs-commit mailing list