Skip to content

Instantly share code, notes, and snippets.

@wyanez
Created May 8, 2011 05:18
Show Gist options
  • Save wyanez/961133 to your computer and use it in GitHub Desktop.
Save wyanez/961133 to your computer and use it in GitHub Desktop.
[OpenVZ] Crear una maquina virtual (contenedor)
#!/bin/bash
ID=$1
IP=$2
DNS=$3
NAME=$4
DISK=$5
PASS=$6
vzctl create $ID --ostemplate debian-6.0-i386-minimal
vzctl set $ID --ipadd $IP --save
vzctl set $ID --nameserver $DNS --save
vzctl set $ID --hostname $NAME --save
vzctl set $ID --diskspace $DISK --save
vzctl set $ID --onboot yes --save
vzctl set $ID --numothersock 120 --save
vzctl set $ID --userpasswd root:$PASS --save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment