PLDWWW: Docs/Vserver

arekm arekm at pld-linux.org
Sat Nov 6 10:06:18 CET 2010


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


---- Page affected: Docs/Vserver

---- Diffs:

================================================================
  VSERVER_SCRIPT="$1"
  VSERVER_NAME="$2"
  
- ip link add name "eth${VSERVER_NAME}" type veth peer name "eth${VSERVER_NAME}"
+ ip link add name "eth-${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 "veth-$VSERVER_NAME" netns $pid
+ ip link set "eth-${VSERVER_NAME}" netns $pid
- /sbin/ifup "eth${VSERVER_NAME}" boot
+ /sbin/ifup "eth-${VSERVER_NAME}" boot
  }}}
  
  Create /etc/vservers/test/scripts/post-stop script:
@@ -1007, +1007 @@

  VSERVER_SCRIPT="$1"
  VSERVER_NAME="$2"
  
- /sbin/ifdown "eth${VSERVER_NAME}" boot
+ /sbin/ifdown "eth-${VSERVER_NAME}" boot
- ip link del "eth${VSERVER_NAME}"
+ ip link del "eth-${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