Skip to content

Instantly share code, notes, and snippets.

@demofly
Last active August 29, 2015 14:15
Show Gist options
  • Save demofly/7eeba801fdcecd21e08e to your computer and use it in GitHub Desktop.
Save demofly/7eeba801fdcecd21e08e to your computer and use it in GitHub Desktop.
PVESH свиной скрипт
#!/bin/bash
set -e # fail on any error
template="Debian-wheezy_7.6_amd64.tar.gz"
hostname="fox.dts.com"; id="102"; ip="155.75.11.23"; swap="0"; disk="20"; cpus="4"; mem="2048"
pvesh create /nodes/oss-hn01/openvz -vmid $id \
-hostname $hostname \
-storage local -ostemplate local:vztmpl/$template \
-memory $mem \
-swap $swap \
-disk $disk \
-cpus $cpus \
-onboot "yes" \
-ip_address "$ip"
#cp $(basename $0) /root/archive/$(basename $0)-$name.$ZONE-$(date +"%Y%m%d-%H-%M-%S")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment